Skip to content

Commit c0e812b

Browse files
abhinayagarwaljohanvos
authored andcommitted
#143 Enable auto-increment of version from Travis after a release is completed. (#160)
1 parent ecdb840 commit c0e812b

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.ci/deploy.sh

+12-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,15 @@ if [[ ! -s sonatype.gpg ]]
66
exit 1
77
fi
88

9-
./gradlew publish --info -PsonatypeUsername=$SONATYPE_USERNAME -PsonatypePassword=$SONATYPE_PASSWORD -Psigning.keyId=$GPG_KEYNAME -Psigning.password=$GPG_PASSPHRASE -Psigning.secretKeyRingFile=sonatype.gpg
9+
./gradlew publish --info -PsonatypeUsername=$SONATYPE_USERNAME -PsonatypePassword=$SONATYPE_PASSWORD -Psigning.keyId=$GPG_KEYNAME -Psigning.password=$GPG_PASSPHRASE -Psigning.secretKeyRingFile=sonatype.gpg
10+
11+
# Update version by 1
12+
newVersion=${TRAVIS_TAG%.*}.$((${TRAVIS_TAG##*.} + 1))
13+
14+
# Replace version = TRAVIS_TAG
15+
# with
16+
# version = newVersion-SNAPSHOT
17+
sed -i -z "0,/version = $TRAVIS_TAG/s//version = $newVersion-SNAPSHOT/" gradle.properties
18+
19+
git commit build.gradle -m "Upgrade version to $newVersion-SNAPSHOT" --author "Github Bot <[email protected]>"
20+
git push https://gluon-bot:$GITHUB_PASSWORD@github.com/gluonhq/substrate HEAD:master

0 commit comments

Comments
 (0)