Skip to content

Commit 8a65a1b

Browse files
committed
add comments
1 parent f929a2d commit 8a65a1b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/nightly-release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
# A previous release was created using a lightweight tag
3535
# git describe by default includes only annotated tags
3636
# git describe --tags includes lightweight tags as well
37-
DESCRIBE=`git tag -l --sort=-v:refname | grep -v cmd | grep -v nightly | head -n 1`
38-
MAJOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[1]}'`
39-
MINOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[2]}'`
40-
MINOR_VERSION="$((${MINOR_VERSION} + 1))"
37+
DESCRIBE=`git tag -l --sort=-v:refname | grep -v cmd | grep -v nightly | head -n 1` # list tags except the ones containing cmd or nightly and then take the latest one
38+
MAJOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[1]}'` # take just the major version digits, e.g. "v0"
39+
MINOR_VERSION=`echo $DESCRIBE | awk '{split($0,a,"."); print a[2]}'` # take just the minor version digits, e.g. "130"
40+
MINOR_VERSION="$((${MINOR_VERSION} + 1))" # bump minor version
4141
TAG="${MAJOR_VERSION}.${MINOR_VERSION}.0-nightly.$(date +'%Y%m%d%H%M')"
4242
git tag -a $TAG -m "$TAG: nightly build"
4343
git push origin $TAG

0 commit comments

Comments
 (0)