From 5f2d3b3c1c330ba2c915745582f568bde9103c72 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Mon, 27 Mar 2017 21:14:25 +0300 Subject: [PATCH] Adds 'after_deploy' travis hook Changes: 1. Adds `after_deploy` hook in travis.yml file 2. Adds `.ci/after_deploy.sh` script to trigger metadata calculation Closes #89 --- .ci/after_deploy.sh | 15 +++++++++++++++ .travis.yml | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 .ci/after_deploy.sh diff --git a/.ci/after_deploy.sh b/.ci/after_deploy.sh new file mode 100644 index 00000000..4aa499a0 --- /dev/null +++ b/.ci/after_deploy.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +set -e + +# This file is required, because for some reason +# travis deploys do not trigger metadata calculation. +# See: https://github.com/sobolevn/git-secret/issues/89 + +# This file is only called after successful deploy. + +# We need to execute custom call to the Bintray API: +curl -X POST \ + --user "sobolevn:$BINTRAY_API_KEY" \ + -H "X-GPG-PASSPHRASE: $BINTRAY_GPG_PASS" \ + "https://api.bintray.com/calc_metadata/sobolevn/$GITSECRET_DIST" diff --git a/.travis.yml b/.travis.yml index 8efa14c4..6f4066de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -71,6 +71,9 @@ deploy: key: "$BINTRAY_API_KEY" passphrase: "$BINTRAY_GPG_PASS" +after_deploy: + - chmod +x ".ci/after_deploy.sh" && ".ci/after_deploy.sh" + notifications: email: on_success: never