From b8574a8cb1e8986d482573c8ad5b6d0f2b6dda03 Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Thu, 19 May 2016 19:20:22 -0700 Subject: Implement authentication environment --- project/scripts/authenv.sh | 137 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100755 project/scripts/authenv.sh diff --git a/project/scripts/authenv.sh b/project/scripts/authenv.sh new file mode 100755 index 0000000..0a61734 --- /dev/null +++ b/project/scripts/authenv.sh @@ -0,0 +1,137 @@ +#!/bin/sh + +# Set up the environment for signing and publishing sbt projects. +# WARNING: this script has global side effects, it is intended to be +# run in an isolated, throw-away environment! + +set -e + +# import public key from key servers +gpg2 --key-server hkp://pool.sks-keyservers.net --recv-keys 4E7DA7B5A0F86992D6EB3F514601878662E33372 + +# import secret signing sub key +# +# this block contains only an encrypted secret subkey used for signing +gpg2 --passphrase="$GPG_PASSPHRASE"--import <> gpg.sbt +import com.typesafe.sbt.pgp.PgpKeys._ +pgpSigningKey in Global := Some(0x2CED17AB2B6D6F37l) +pgpPassphrase in Global := Some(sys.env("GPG_PASSPHRASE").toArray) +useGpg in Global := true +EOF + +# prepare bintray settings +mkdir -p "$HOME"/.bintray +echo <> "$HOME"/.bintray/.credentials +realm = Bintray API Realm +host = api.bintray.com +user = jodersky +password = "$BINTRAY_KEY" +EOF -- cgit v1.2.3