diff --git a/.github/workflows/rename_project.sh b/.github/workflows/rename_project.sh index 1562df6..f034f54 100755 --- a/.github/workflows/rename_project.sh +++ b/.github/workflows/rename_project.sh @@ -1,11 +1,13 @@ #!/usr/bin/env bash -while getopts a:n:u:d: flag +# vim:sw=2:ts=2:sts=2:et +while getopts a:n:u: flag do - case "${flag}" in - a) owner=${OPTARG};; - n) name=${OPTARG};; - u) url=${OPTARG};; - esac + case "${flag}" in + a) owner=${OPTARG};; + n) name=${OPTARG};; + u) url=${OPTARG};; + *) echo "Invalid flag: ${flag}"; exit 1;; + esac done echo "Owner: $owner"; @@ -19,10 +21,10 @@ original_name="{{REPOSITORY_NAME}}" original_url="{{REPOSITORY_URL}}" for filename in $(git ls-files) do - sed -i "s/$original_owner/$owner/g" $filename - sed -i "s/$original_name/$name/g" $filename - sed -i "s/$original_url/$url/g" $filename - echo "Renamed $filename" + sed -i "s/$original_owner/$owner/g" "$filename" + sed -i "s/$original_name/$name/g" "$filename" + sed -i "s/$original_url/$url/g" "$filename" + echo "Renamed $filename" done # This command runs only once on GHA! diff --git a/README.md b/README.md index 603fb0b..cae6f85 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/nginxinc/template-repository/main/CODE_OF_CONDUCT.md) -[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/nginxinc/template-repository/blob/main/SUPPORT.md) - [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/nginxinc/template-repository/badge)](https://securityscorecards.dev/viewer/?uri=github.com/nginxinc/template-repository) +[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/nginxinc/template-repository/blob/main/SUPPORT.md) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/nginxinc/template-repository/main/CODE_OF_CONDUCT.md) # NGINX Template Repository @@ -21,7 +20,7 @@ This template includes all the scaffolding you need to get started on an OSS rep - [README](https://github.com/nginxinc/template-repository/blob/main/README.md) placeholder. How you structure the README is up to you (although the template provides placeholder sections), but you will need to include: - A [repostatus](https://www.repostatus.org/) badge - A contributor covenant/code of conduct badge. (Optional -- If you already have multiple badges and want to reduce clutter, simply including the actual code of conduct is enough.) - - A community and/or commercial support badge. Include the latter -- and replace the URL placeholder with the relevant support URL -- if this repository contains a commercially supported project. You can find a commented out example below the community badge in this README. + - A community and/or commercial support badge. Include the latter -- and replace the commented out badge/URL placeholder with the relevant support URL -- if this repository contains a commercially supported project. You can find a commented out example below the community badge in this README. - An OSSF Scorecard badge (Optional -- Some projects will by their own nature have low scores. In such a case you might want to remove this badge!) - An explicit link back to the [Apache License 2.0](https://github.com/nginxinc/template-repository/blob/main/LICENSE) - An up to date copyright notice @@ -47,10 +46,9 @@ This template includes all the scaffolding you need to get started on an OSS rep [![Project Status: Concept – Minimal or no implementation has been done yet, or the repository is only intended to be a limited example, demo, or proof-of-concept.](https://www.repostatus.org/badges/latest/concept.svg)](https://www.repostatus.org/#concept) -[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/main/CODE_OF_CONDUCT.md) -[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/SUPPORT.md) - [![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/badge)](https://securityscorecards.dev/viewer/?uri=github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}) +[![Community Support](https://badgen.net/badge/support/community/cyan?icon=awesome)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/blob/main/SUPPORT.md) +[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://github.com/{{REPOSITORY_OWNER}}/{{REPOSITORY_URL}}/main/CODE_OF_CONDUCT.md) # {{REPOSITORY_NAME}}