From ea2cae1233420d5d0626a08ad6c9ed9d9443d179 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Mon, 24 Sep 2018 16:33:52 -0400 Subject: [PATCH] update; Signed-off-by: Jess Frazelle --- github-dev/upload-assets | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/github-dev/upload-assets b/github-dev/upload-assets index 6da9a79..3064813 100755 --- a/github-dev/upload-assets +++ b/github-dev/upload-assets @@ -2,8 +2,10 @@ set -e set -o pipefail -if [[ -z "$TOKEN" ]]; then - echo "Set the TOKEN env variable." +GITHUB_TOKEN=${GITHUB_TOKEN:-$TOKEN} + +if [[ -z "$GITHUB_TOKEN" ]]; then + echo "Set the GITHUB_TOKEN env variable." exit 1 fi @@ -15,7 +17,7 @@ fi URI=https://api.github.com API_VERSION=v3 API_HEADER="Accept: application/vnd.github.${API_VERSION}+json" -AUTH_HEADER="Authorization: token ${TOKEN}" +AUTH_HEADER="Authorization: token ${GITHUB_TOKEN}" main(){ local files