diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-06 22:15:37 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-02-06 22:42:21 -0800 |
commit | bb4f2691f26f20dd8e6bdc1108eef9a83af0944e (patch) | |
tree | e81661dcfe7a9792fadca2269ec22f61bd1fbf2b /ci | |
parent | b97acb6f671502f57134932d0e7908e333b7cbbe (diff) | |
parent | 3eaa2a12bbe6ee4ecf6d8f839b60f2e000c4d1a1 (diff) | |
download | mill-bb4f2691f26f20dd8e6bdc1108eef9a83af0944e.tar.gz mill-bb4f2691f26f20dd8e6bdc1108eef9a83af0944e.tar.bz2 mill-bb4f2691f26f20dd8e6bdc1108eef9a83af0944e.zip |
Merge branch 'master' of github.com:lihaoyi/mill
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/release.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ci/release.py b/ci/release.py index c59c6811..a385ba40 100755 --- a/ci/release.py +++ b/ci/release.py @@ -1,17 +1,20 @@ #!/usr/bin/env python 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" && - (os.environ["TRAVIS_BRANCH"] == "master" || os.environ["TRAVIS_TAG"] != "") + os.environ["TRAVIS_PULL_REQUEST"] == "false" and + (os.environ["TRAVIS_BRANCH"] == "master" or os.environ["TRAVIS_TAG"] != "") ) -with open("~/gpg.key", "w") as f: +_, tmp = tempfile.mkstemp() + +with open(tmp, "w") as f: f.write(base64.b64decode(os.environ["GPG_PRIVATE_KEY_B64"])) -check_call(["gpg", "--import", "~/gpg.key"]) +check_call(["gpg", "--import", tmp]) check_call([ "target/bin/mill", |