Skip to content

Commit

Permalink
Extract type from tag
Browse files Browse the repository at this point in the history
  • Loading branch information
vdo committed Apr 26, 2019
1 parent 91a76a9 commit 096cfff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
# before_deploy:
# - wget -O - https://raw.githubusercontent.com/dappnode/DAppNode/<path-to-script>/before_deploy.sh | bash


echo "Running DAppNode travis CI before_deploy.sh script"

# 0. Grab release type (e.g. release:minor)
TYPE=${TRAVIS_TAG##*:}
[ ! "$TYPE" = "release" ] || TYPE="patch"

# 1. Configure the git user to dappnode
git config --global user.email "[email protected]"
git config --global user.name "dappnode"
Expand All @@ -35,7 +40,7 @@ git tag --delete $TRAVIS_TAG || echo "Error deleting previous tag $TRAVIS_TAG lo
npm install -g @dappnode/dappnodesdk

# 5. Compute the next version from the mainnet APM smart contract
export RELEASE_VERSION=$(dappnodesdk next patch -p infura || "0.0.1")
export RELEASE_VERSION=$(dappnodesdk next ${TYPE} -p infura || "0.0.1")
export TRAVIS_TAG="v${RELEASE_VERSION}"
echo "NEXT TRAVIS_TAG $TRAVIS_TAG"

Expand Down

0 comments on commit 096cfff

Please sign in to comment.