Skip to content

Commit 8f433c7

Browse files
committed
feat: update gitignore for opun configuration injection, bootstrap
script to update go.mod and other refs, etc
1 parent 90018a4 commit 8f433c7

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ bin/
3939
*~
4040
*.sublime-*
4141

42+
# Claude Code specific
43+
.claude/
44+
.mcp.json
45+
4246
# Environment variables
4347
.env
4448
.env.local

justfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,36 @@ bootstrap module_name='' type='cli' *args='':
265265
sed -i.bak "s|BINARY_NAME=tmpl|BINARY_NAME=${PROJECT_NAME}|g" Makefile && rm Makefile.bak
266266
fi
267267

268+
# Update .gitignore project-specific entries
269+
if [ -f ".gitignore" ]; then
270+
sed -i.bak "s|/tmpl$|/${PROJECT_NAME}|g" .gitignore
271+
sed -i.bak "s|/tmpl_|/${PROJECT_NAME}_|g" .gitignore
272+
sed -i.bak "s|tmpl-|${PROJECT_NAME}-|g" .gitignore
273+
rm -f .gitignore.bak
274+
fi
275+
276+
# Update .golangci.yml if it exists
277+
if [ -f ".golangci.yml" ]; then
278+
sed -i.bak "s|github.com/rizome-dev/tmpl|${MODULE_NAME}|g" .golangci.yml && rm .golangci.yml.bak
279+
fi
280+
281+
# Update README.md if it exists
282+
if [ -f "README.md" ]; then
283+
sed -i.bak "s|# tmpl|# ${PROJECT_NAME}|g" README.md
284+
sed -i.bak "s|github.com/rizome-dev/tmpl|${MODULE_NAME}|g" README.md
285+
rm -f README.md.bak
286+
fi
287+
288+
# Update CLAUDE.md if it exists - only update module references, not the template description
289+
if [ -f "CLAUDE.md" ]; then
290+
# Only update the actual module reference, not the template description
291+
sed -i.bak "s|github.com/rizome-dev/tmpl)|${MODULE_NAME})|g" CLAUDE.md
292+
rm -f CLAUDE.md.bak
293+
fi
294+
295+
# Update "Hello from tmpl!" messages in any Go files
296+
find . -type f -name "*.go" -exec sed -i.bak "s|Hello from tmpl!|Hello from ${PROJECT_NAME}!|g" {} \; && find . -name "*.bak" -delete
297+
268298
# Create type-specific structure
269299
case "{{type}}" in
270300
cli)

0 commit comments

Comments
 (0)