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
1 changed files with 9 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
#### $$VERSION$$ v1.45-dev-75-gfdb2b3a
#### $$VERSION$$ v1.45-dev-78-gc4e2981
# shellcheck disable=SC2016
#
# Easy Versioning in git:
@ -44,8 +44,14 @@ VERSION="$(git describe --tags --long)"
printf "Update to version %s ...\n" "${VERSION}"
# only regular files, ignore .dot files/dirs, e.g. .git .gitinore in BASEDIR
FILES="$(find ./* -type f)"
[ "$1" != "" ] && FILES="$*"
if [ -n "$1" ]; then
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
if [[ "${FILES}" == *"README.md"* ]]; then