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 9659a81 commit 9702005
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/template-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@ jobs:
uses: actions/checkout@v3
- name: Cleanup
run: |
# Debugging
echo "Repository name: $GITHUB_REPOSITORY"
export LC_CTYPE=C
export LANG=C
# Get name portion from repository name
NAME="${GITHUB_REPOSITORY##*/}"
echo "Base name: $NAME"
# Generate name versions from base
KEBAB=$(echo $NAME | tr -s -c '[:alpha:][:cntrl:]' ' ' | tr '[:upper:]' '[:lower:]' | tr ' ' '-')
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)) : "")}')"
# Debugging
echo "Kebab name: $KEBAB"
echo "Studly name: $STUDLY"
# Replace placeholder names
find . -type f -not -name "template-cleanup.yml" -exec sed -i "s/laravel-package-template/$KEBAB/g" {} +
Expand Down

0 comments on commit 9702005

Please sign in to comment.