Skip to content

Commit

Permalink
fix(build): error in tagging the downstream repo
Browse files Browse the repository at this point in the history
In case of travis, the $TRAVIS_BRANCH contains
the same value as $TRAVIS_TAG.

Example: 1.9.0-RC1 tag and 1.9.0-RC1 branch.

Due to this the git-release script failed.

This commit adds a step to convert the TRAVIS_TAG
to corresponding release branch.
Example: 1.9.0-RC1 should happen from v1.9.x

Note: OpenEBS release follow the SemVer release format
 of major.minor.patch[-build-meta]

Signed-off-by: kmova <[email protected]>
  • Loading branch information
kmova committed Apr 8, 2020
1 parent 8928b05 commit fa14d34
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,14 @@ script:
# If this build is running due to travis release tag, and
# this job indicates to push the release downstream, then
# go ahead and tag the dependent repo.
#
# $TRAVIS_BRANCH contains the same value as $TRAVIS_TAG.
# Example: 1.9.0-RC1 tag and 1.9.0-RC1 branch.
# OpenEBS release are done from branches named as v1.9.x.
# Convert the TRAVIS_TAG to the corresponding release branch.
- if [ ! -z $TRAVIS_TAG ] && [ $RELEASE_TAG_DOWNSTREAM = 1 ] && [ "$TRAVIS_REPO_SLUG" == "openebs/jiva-operator" ]; then
./build/git-release "openebs/jiva-csi" "$TRAVIS_TAG" "$TRAVIS_BRANCH" || travis_terminate 1;
REL_BRANCH=$(echo v$(echo "$TRAVIS_TAG" | cut -d'-' -f1 | rev | cut -d'.' -f2- | rev).x) ;
./build/git-release "openebs/jiva-csi" "$TRAVIS_TAG" "$REL_BRANCH" || travis_terminate 1;
fi
notifications:
email:
Expand Down

0 comments on commit fa14d34

Please sign in to comment.