aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-05-20 18:42:00 -0700
committerJakob Odersky <jakob@odersky.com>2016-05-20 18:42:00 -0700
commit997e7bd96a05b104efa370aa37b5e2095cf15c39 (patch)
tree81b28576f26ca528f8668e88883f0d0ff330bf60
parent4693d412bcdf5533986dae4e1209ea357bec9c6c (diff)
downloaddummy-997e7bd96a05b104efa370aa37b5e2095cf15c39.tar.gz
dummy-997e7bd96a05b104efa370aa37b5e2095cf15c39.tar.bz2
dummy-997e7bd96a05b104efa370aa37b5e2095cf15c39.zip
dummy
-rw-r--r--.drone.yml1
-rwxr-xr-x.drone/authenv.sh12
2 files changed, 10 insertions, 3 deletions
diff --git a/.drone.yml b/.drone.yml
index 8b78fda..c30124a 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -10,6 +10,7 @@ build:
event: push
success: true
environment:
+ SECURE: "$$SECURE"
GPG_SSB_ENC: "$$GPG_SSB_ENC"
BINTRAY_KEY: "$$BINTRAY_KEY"
commands:
diff --git a/.drone/authenv.sh b/.drone/authenv.sh
index b4142dd..4738d5c 100755
--- a/.drone/authenv.sh
+++ b/.drone/authenv.sh
@@ -7,9 +7,15 @@
set -e
echo "Preparing authenticated environment"
-echo "ssb: $GPG_SSB"
-if [ -z "$GPG_SSB" ] || [ -z "$BINTRAY_KEY" ]; then
- echo "Secrets not defined!" >&2
+echo $$
+
+if [ -z "CI" ]; then
+ echo "This script should be run in a CI environment. Aborting."
+ exit 1
+fi
+
+if [ -z "$SECURE" ] || [ "$SECURE" = "\$\$SECURE" ]; then
+ echo "Secrets not defined. Aborting." >&2
exit 1
fi