File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,17 @@ jobs:
2020 uses : actions/checkout@v4
2121 - name : Run Template Setup
2222 run : |
23- git config user.name "Foo Bearer"
23+
24+ git config --global user.email "you@example.com"
25+ git config --global user.name "Your Name"
26+
2427 ./setup.bash \
25- "foo" \
26- "Zenobius" \
27- "Zenobius" \
28+ "@foo/bar_tool" \
29+ "bar_tool" \
30+ "username" \
31+ "author name" \
32+ "username/bar_tool" \
33+ "master" \
2834 "Apache-2.0" \
2935 "yes"
3036
3541 exit 1
3642 }
3743
44+
3845 set -xe
3946
4047 ls -la .
Original file line number Diff line number Diff line change 2323 act \
2424 - P ubuntu-latest=nektos/ act-environments-ubuntu:18.04 \
2525 - -secret-file .secrets \
26- - -env -file .env
26+ - -env -file .env \
27+ - W .github/ workflows/ test.yml
2728
2829 @ echo " "
2930 @ echo " 👍 Done"
Original file line number Diff line number Diff line change @@ -100,11 +100,18 @@ set_placeholder() {
100100 value=" $2 "
101101 out=" $3 "
102102
103+ # loop through file contents and replace placeholders
103104 git grep -P -l -F --untracked " $name " -- " $out " |
104105 while IFS=$' \n ' read -r file; do
105106 tmpfile=" $file .sed"
106107 sed " s#$name #$value #g" " $file " > " $tmpfile " && mv " $tmpfile " " $file "
108+
109+ # if filename contains placeholder, rename it
110+ if echo " $file " | grep -q " $name " ; then
111+ mv " $file " " ${file/ $name / $value } "
112+ fi
107113 done
114+
108115}
109116
110117setup () {
@@ -214,6 +221,6 @@ case "${1:-}" in
214221 ./template/tools.sh
215222 ;;
216223* )
217- setup_github " $@ "
224+ setup " $@ "
218225 ;;
219226esac
You can’t perform that action at this time.
0 commit comments