Skip to content

Commit

Permalink
Merge branch 'autopublish'
Browse files Browse the repository at this point in the history
Conflicts:
	.travis.yml
	admin/build.sh
	admin/encryptAll.sh
  • Loading branch information
adriaanm committed Dec 4, 2014
2 parents 8af41c1 + b68e449 commit 2f95a03
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
10 changes: 7 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
language: scala

# Don't commit sensitive files, commit the encrypted version: admin/encrypt.sh $SENSITIVE # keep it secret, add $SENSITIVE.enc to the repo
# On travis: admin/decrypt.sh $SENSITIVE
env:
- secure: "whJQqI/7G+kUJoCCGQYbv3Y/T2Cx3EcBKfCyvMkZaVgo0wFEOUguh8I+4QqRyf9cC/uPmzwCzV9uwXsNDMcY78jouY05A+fCEnUol/9TuF5PWmXF6Yr/UmmYoCQe4pioXsbXa4uOy18kLzE0h2sOIrJ5A9NL8/58iVgl4E3pwvk="
global:
- PUBLISH_JDK=openjdk6 # admin/build.sh only publishes when running on this jdk
# Don't commit sensitive files, instead commit a version encrypted with $SECRET,
# this environment variable is encrypted with this repo's private key and stored below:
# (See http://docs.travis-ci.com/user/environment-variables/#Secure-Variables.)
- secure: "whJQqI/7G+kUJoCCGQYbv3Y/T2Cx3EcBKfCyvMkZaVgo0wFEOUguh8I+4QqRyf9cC/uPmzwCzV9uwXsNDMcY78jouY05A+fCEnUol/9TuF5PWmXF6Yr/UmmYoCQe4pioXsbXa4uOy18kLzE0h2sOIrJ5A9NL8/58iVgl4E3pwvk="

script:
- admin/build.sh
scala:
Expand Down
7 changes: 4 additions & 3 deletions admin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# git on travis does not fetch tags, but we have TRAVIS_TAG
# headTag=$(git describe --exact-match ||:)

if [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
if [ "$TRAVIS_JDK_VERSION" == "$PUBLISH_JDK" ] && [[ "$TRAVIS_TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9-]+)? ]]; then
echo "Going to release from tag $TRAVIS_TAG!"
myVer=$(echo $TRAVIS_TAG | sed -e s/^v//)
export publishVersion='set every version := "'$myVer'"'
export extraTarget="publish-signed"
publishVersion='set every version := "'$myVer'"'
extraTarget="publish-signed"

cat admin/gpg.sbt >> project/plugins.sbt
admin/decrypt.sh sensitive.sbt
(cd admin/ && ./decrypt.sh secring.asc)
Expand Down
2 changes: 1 addition & 1 deletion admin/encryptAll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ travis encrypt SECRET=$SECRET
admin/encrypt.sh admin/secring.asc
admin/encrypt.sh sensitive.sbt

# rm sensitive.sbt admin/secring.asc
echo "Remember to rm sensitive.sbt admin/secring.asc -- once you do, they cannot be recovered (except on Travis)!"

0 comments on commit 2f95a03

Please sign in to comment.