diff --git a/.github/rename-project.sh b/.github/rename-project.sh index cc4e9d6..d634172 100644 --- a/.github/rename-project.sh +++ b/.github/rename-project.sh @@ -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 \ No newline at end of file +rm -rf .github/template.yml