Skip to content

Commit

Permalink
Merge pull request #1428 from skalenetwork/enhancement/prepare-milest…
Browse files Browse the repository at this point in the history
…one-branch

Prepare milestone branch
  • Loading branch information
DmytroNazarenko authored Feb 3, 2023
2 parents d551c05 + 6e3cb44 commit 35c6cc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [closed]
branches:
- master
- 'v*.*.*'
- develop
- beta
- stable
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
export VERSION=$(bash ./scripts/calculate_version.sh)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "Version $VERSION"
( test $BRANCH = "stable" || test $BRANCH = "master" && export PRERELEASE=false ) || export PRERELEASE=true
( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
echo ------------ download binaries
LIB_BLS_RELEASE_TAG=${{ secrets.LIB_BLS_RELEASE_TAG }} bash ./scripts/download_binaries.sh
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3.4
1.6.0
7 changes: 5 additions & 2 deletions scripts/calculate_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ if [ -z "$VERSION" ]; then
exit 1
fi

if [[ $BRANCH == 'master' ]]; then
if [[ $BRANCH == 'stable' ]]; then
echo "$VERSION"
exit 1
fi

git fetch --tags > /dev/null

TAG=$BRANCH
if [[ $BRANCH == 'v*.*.*' ]]; then TAG='develop'; fi

for (( NUMBER=0; ; NUMBER++ ))
do
FULL_VERSION="$VERSION-$BRANCH.$NUMBER"
FULL_VERSION="$VERSION-$TAG.$NUMBER"
if ! [[ $(git tag -l | grep "$FULL_VERSION") ]]; then
echo "$FULL_VERSION" | tr / -
break
Expand Down

0 comments on commit 35c6cc4

Please sign in to comment.