summaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-02-04 21:30:19 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-02-04 22:17:33 -0800
commit5df106084edd8217bf9fa473072868a9d1ecfb5f (patch)
treedda3cbd3613c59228e897273ae9681fb3422aa47 /build.sc
parent00d0f979e2facd2c5d12d06dd2dc70c0b14c3c1f (diff)
downloadmill-5df106084edd8217bf9fa473072868a9d1ecfb5f.tar.gz
mill-5df106084edd8217bf9fa473072868a9d1ecfb5f.tar.bz2
mill-5df106084edd8217bf9fa473072868a9d1ecfb5f.zip
wip getting release.sh working0.0.3
Diffstat (limited to 'build.sc')
-rwxr-xr-xbuild.sc34
1 files changed, 17 insertions, 17 deletions
diff --git a/build.sc b/build.sc
index ff819daf..0201f076 100755
--- a/build.sc
+++ b/build.sc
@@ -213,7 +213,9 @@ def gitHead = T.input{
}
def publishVersion = T.input{
val tag =
- try Option(%%('git, 'describe, "--exact-match", "--tags", gitHead())(pwd).out.string)
+ try Option(
+ %%('git, 'describe, "--exact-match", "--tags", gitHead())(pwd).out.string.trim()
+ )
catch{case e => None}
tag match{
@@ -247,10 +249,10 @@ def releaseCI(githubAuthKey: String,
sonatypeCreds: String,
gpgPassphrase: String,
gpgPrivateKey: String) =
- if (isMasterCommit) T.command()
+ if (!isMasterCommit) T.command()
else {
write(home / "gpg.key", java.util.Base64.getDecoder.decode(gpgPrivateKey))
- %('gpg, 'import, home / "gpg.key")(pwd)
+ %('gpg, "--import", home / "gpg.key")(pwd)
T.command{
releaseManual(githubAuthKey, sonatypeCreds, gpgPassphrase)()
}
@@ -259,18 +261,16 @@ def releaseCI(githubAuthKey: String,
def releaseManual(githubAuthKey: String,
sonatypeCreds: String,
- gpgPassphrase: String) =
- if (isMasterCommit) T.command()
- else T.command{
- moduledefs.publish(sonatypeCreds, gpgPassphrase)()
- core.publish(sonatypeCreds, gpgPassphrase)()
- scalalib.publish(sonatypeCreds, gpgPassphrase)()
- scalajslib.publish(sonatypeCreds, gpgPassphrase)()
- scalaworker.publish(sonatypeCreds, gpgPassphrase)()
- scalajslib.jsbridges("0.6").publish(sonatypeCreds, gpgPassphrase)()
- scalajslib.jsbridges("1.0").publish(sonatypeCreds, gpgPassphrase)()
- val (release, label) = publishVersion()
- uploadToGithub(releaseAssembly().path, githubAuthKey, release, label)
- ()
- }
+ gpgPassphrase: String) = T.command{
+ moduledefs.publish(sonatypeCreds, gpgPassphrase)()
+ core.publish(sonatypeCreds, gpgPassphrase)()
+ scalalib.publish(sonatypeCreds, gpgPassphrase)()
+ scalajslib.publish(sonatypeCreds, gpgPassphrase)()
+ scalaworker.publish(sonatypeCreds, gpgPassphrase)()
+ scalajslib.jsbridges("0.6").publish(sonatypeCreds, gpgPassphrase)()
+ scalajslib.jsbridges("1.0").publish(sonatypeCreds, gpgPassphrase)()
+ val (release, label) = publishVersion()
+ uploadToGithub(releaseAssembly().path, githubAuthKey, release, label)
+ ()
+}