diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:38:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 12:38:42 +0000 |
commit | c3ca98e1b35123f226c7f4c596b5dee78caa4223 (patch) | |
tree | 9b6eb109283da55e7d9064baa9fac795a40264cb /bin/make-snapshot.sh | |
parent | Initial commit. (diff) | |
download | icinga-php-thirdparty-c3ca98e1b35123f226c7f4c596b5dee78caa4223.tar.xz icinga-php-thirdparty-c3ca98e1b35123f226c7f4c596b5dee78caa4223.zip |
Adding upstream version 0.11.0.upstream/0.11.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | bin/make-snapshot.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/make-snapshot.sh b/bin/make-snapshot.sh new file mode 100755 index 0000000..c2c60a0 --- /dev/null +++ b/bin/make-snapshot.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +set -xe + +BRANCH="$1" + +if [ -z $BRANCH ]; then + echo "USAGE: $0 <branch>" + echo " e.g.: $0 snapshot/nightly" + exit 1 +fi + +LATEST_TAG=$(git for-each-ref refs/tags --sort=-taggerdate --format='%(refname)' --count=1 | awk -F/ '{print $3}') +NEXT_VERSION=$(echo "${LATEST_TAG:1}" | awk -F. -v OFS=. '{$3=0}; {++$2}; {print}') + +if [[ -n $(git branch | grep $BRANCH) ]]; then + git branch -D $BRANCH +fi + +git checkout -b $BRANCH +git merge --no-ff -m "Merge latest tag, to make it reachable for git-describe" $LATEST_TAG + +git commit -a -m "Require dev-master everywhere" +bin/make-release.sh "$NEXT_VERSION-dev" --no-checkout |