Skip to content

Commit

Permalink
Update template cleanup script
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Jan 4, 2024
1 parent 9702005 commit 033e785
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/template-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ jobs:
STUDLY="$(echo "$NAME" | awk '{split($0,a,"[_ -]"); for(i=1;i<=length(a);++i) printf "%s",(length(a[i]) > 0 ? toupper(substr(a[i],1,1)) tolower(substr(a[i],2)) : "")}')"
# Replace placeholder names
find . -type f -not -name "template-cleanup.yml" -exec sed -i "s/laravel-package-template/$KEBAB/g" {} +
find . -type f -not -name "template-cleanup.yml" -exec sed -i "s/LaravelPackageTemplate/$STUDLY/g" {} +
find . -type d \( -path "./.git" -o -path "./.github" \) -prune -o -type f -exec sed -i "s/laravel-package-template/$KEBAB/g" {} +
find . -type d \( -path "./.git" -o -path "./.github" \) -prune -o -type f -exec sed -i "s/LaravelPackageTemplate/$STUDLY/g" {} +
# Rename files
mv .idea/laravel-package-template.iml .idea/$KEBAB.iml
mv config/config.php config/$KEBAB.php
git mv .idea/laravel-package-template.iml .idea/$KEBAB.iml
git mv config/config.php config/$KEBAB.php
# Cleanup
rm -f .github/workflows/template-cleanup.yml
- name: Show changes
run: git status
- name: Commit files
run: |
git config --local user.email "[email protected]"
Expand Down
8 changes: 6 additions & 2 deletions .idea/blade.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 033e785

Please sign in to comment.