summaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-02-09 19:27:02 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-02-09 19:27:02 -0800
commit3e6744393de81a9f0aded7412f92209831f0f9d0 (patch)
treee45734d619864ae45551a71790b2e86ff5bc9ce6 /ci
parente88838a99118d7c4ac489313129c7534610dfbe6 (diff)
downloadmill-3e6744393de81a9f0aded7412f92209831f0f9d0.tar.gz
mill-3e6744393de81a9f0aded7412f92209831f0f9d0.tar.bz2
mill-3e6744393de81a9f0aded7412f92209831f0f9d0.zip
Allow publishing to sonatype without immediate release
Diffstat (limited to 'ci')
-rwxr-xr-xci/release.py27
1 files changed, 15 insertions, 12 deletions
diff --git a/ci/release.py b/ci/release.py
index c08a1b17..5777d183 100755
--- a/ci/release.py
+++ b/ci/release.py
@@ -3,23 +3,26 @@
from subprocess import check_call
import tempfile
import os, base64
-check_call(["sbt", "bin/test:assembly"])
+
is_master_commit = (
os.environ["TRAVIS_PULL_REQUEST"] == "false" and
(os.environ["TRAVIS_BRANCH"] == "master" or os.environ["TRAVIS_TAG"] != "")
)
-_, tmp = tempfile.mkstemp()
+if is_master_commit:
+ check_call(["sbt", "bin/test:assembly"])
+
+ _, tmp = tempfile.mkstemp()
-with open(tmp, "w") as f:
- f.write(base64.b64decode(os.environ["GPG_PRIVATE_KEY_B64"]))
+ with open(tmp, "w") as f:
+ f.write(base64.b64decode(os.environ["GPG_PRIVATE_KEY_B64"]))
-check_call(["gpg", "--import", tmp])
+ check_call(["gpg", "--import", tmp])
-check_call([
- "target/bin/mill",
- "mill.scalalib.PublishModule/publishAll",
- "lihaoyi:" + os.environ["SONATYPE_PASSWORD"],
- os.environ["GPG_PASSWORD"],
- "__.publishArtifacts"
-])
+ check_call([
+ "target/bin/mill",
+ "mill.scalalib.PublishModule/publishAll",
+ "lihaoyi:" + os.environ["SONATYPE_PASSWORD"],
+ os.environ["GPG_PASSWORD"],
+ "__.publishArtifacts"
+ ])