dev: version.sh: ask to update ALL files

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-03-05 12:01:21 +01:00
parent c4e2981116
commit b1af0f07e7

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# #
#### $$VERSION$$ v1.45-dev-75-gfdb2b3a #### $$VERSION$$ v1.45-dev-78-gc4e2981
# shellcheck disable=SC2016 # shellcheck disable=SC2016
# #
# Easy Versioning in git: # Easy Versioning in git:
@ -44,8 +44,14 @@ VERSION="$(git describe --tags --long)"
printf "Update to version %s ...\n" "${VERSION}" printf "Update to version %s ...\n" "${VERSION}"
# only regular files, ignore .dot files/dirs, e.g. .git .gitinore in BASEDIR # only regular files, ignore .dot files/dirs, e.g. .git .gitinore in BASEDIR
FILES="$(find ./* -type f)" if [ -n "$1" ]; then
[ "$1" != "" ] && FILES="$*" FILES="$*"
else
printf "Update version string in all files? (y/N)\b\b"
read -r answer
[[ "${answer}" != "y" && "${answer}" != "Y" ]] && exit
FILES="$(find ./* -type f)"
fi
# autogenerate REMADME.html REMADE.txt # autogenerate REMADME.html REMADE.txt
if [[ "${FILES}" == *"README.md"* ]]; then if [[ "${FILES}" == *"README.md"* ]]; then