mirror of
https://github.com/Icinga/icinga-php-thirdparty.git
synced 2025-07-10 15:24:35 +02:00
It's not required, since git describe is not used for snapshot package versioning anymore.
22 lines
489 B
Bash
Executable File
22 lines
489 B
Bash
Executable File
#!/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
|
|
bin/make-release.sh "$NEXT_VERSION-dev" --no-checkout
|