Skip to content

Commit

Permalink
Update template-cleanup.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
inxilpro committed Sep 29, 2023
1 parent b57a39c commit 5448033
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/template-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,20 @@ jobs:
uses: actions/checkout@v3
- name: Cleanup
run: |
export LC_CTYPE=C
export LANG=C
# Debugging
echo "Repository name: $GITHUB_REPOSITORY"
NAME="${GITHUB_REPOSITORY##*/}"
KEBAB=$(echo $NAME | tr -s -c '[:alpha:][:cntrl:]' ' ' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
STUDLY=$(echo $NAME | tr -s -c '[:alpha:][:cntrl:]' ' ' | tr '[:upper:]' '[:lower:]' | awk '{for(i=1;i<=NF;i++){$i=toupper(substr($i,1,1)) tolower(substr($i,2))}print}'')
# Debugging
echo "Base name: $NAME"
echo "Kebab name: $KEBAB"
echo "Studly name: $STUDLY"
# Replace placeholder names
find src -type f -exec sed -i "s/laravel-package-template/$KEBAB/g" {} +
Expand Down

0 comments on commit 5448033

Please sign in to comment.