Skip to content

Commit

Permalink
Fix replace personal info Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
lowk3v authored Apr 26, 2024
1 parent 822de6d commit 51ea0e4
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/rename-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,21 @@ do
if [[ $filename == *".github"* ]]; then
continue
fi
sed -i -- "s/author_name/$author/g" $filename
sed -i -- "s/project_description/$description/g" $filename
sed -i -- "s/PROJECT_NAME/$name_upper/g" $filename
sed -i -- "s/project_name/$name/g" $filename
if [[ $(uname) == "Darwin" ]]; then
sed -i '' -e "s/author_name/$author/g" $filename
sed -i '' -e "s/project_description/$description/g" $filename
sed -i '' -e "s/PROJECT_NAME/$name_upper/g" $filename
sed -i '' -e "s/project_name/$name/g" $filename
else
sed -i '' "s/author_name/$author/g" $filename
sed -i '' "s/project_description/$description/g" $filename
sed -i '' "s/PROJECT_NAME/$name_upper/g" $filename
sed -i '' "s/project_name/$name/g" $filename
fi
echo "Renamed $filename"
done

mv cmd/app cmd/$name
mv pkg/app/app.go pkg/app/$name.go
mv pkg/app pkg/$name
mv configs/.env-example configs/.env

# This command runs only once on GHA!
rm -rf .github/template.yml
rm -rf .github/template.yml

0 comments on commit 51ea0e4

Please sign in to comment.