Skip to content

Commit d793270

Browse files
committed
Merge pull request #40 from adriaanm/autopublish
Use TRAVIS_TAG because tags are not fetched
2 parents 643b308 + d311980 commit d793270

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

admin/publishPrep.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
# prep environment for publish to sonatype staging if the HEAD commit is tagged
44

5-
headTag=$(git describe --exact-match ||:)
5+
# git on travis does not fetch tags, but we have TRAVIS_TAG
6+
# headTag=$(git describe --exact-match ||:)
67

7-
if [[ "$headTag" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
8-
echo "HEAD is tagged as $headTag."
9-
export publishVersion="set every version := \"$(echo $headTag | sed -e s/^v//)\""
8+
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
9+
echo "Going to release from tag $TRAVIS_TAG!"
10+
export publishVersion="set every version := \"$(echo $TRAVIS_TAG | sed -e s/^v//)\""
1011
export extraTarget="publish-signed"
1112
cat admin/gpg.sbt >> project/plugins.sbt
1213
admin/decrypt.sh sensitive.sbt

0 commit comments

Comments
 (0)