From 3d952536d883c3073dc4df848a11c26cde9348f1 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 3 May 2021 11:54:39 -0230 Subject: [PATCH] Migrate check for GITHUB_TOKEN (#10958) The check for the GITHUB_TOKEN environment variable was being done in the wrong release script. It has been migrated to the relevant script. A second check for the username has also been added, as it is also required. --- .circleci/scripts/release-commit-version-bump.sh | 10 ++++++++++ .circleci/scripts/release-create-release-pr.sh | 6 ------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.circleci/scripts/release-commit-version-bump.sh b/.circleci/scripts/release-commit-version-bump.sh index 6ceb67fb9..3def6f64e 100755 --- a/.circleci/scripts/release-commit-version-bump.sh +++ b/.circleci/scripts/release-commit-version-bump.sh @@ -16,6 +16,16 @@ then exit 1 fi +if [[ -z "${GITHUB_TOKEN:-}" ]] +then + printf '%s\n' 'GITHUB_TOKEN environment variable must be set' + exit 1 +elif [[ -z "${GITHUB_TOKEN_USER:-}" ]] +then + printf '%s\n' 'GITHUB_TOKEN_USER environment variable must be set' + exit 1 +fi + printf '%s\n' 'Commit the manifest version and changelog if the manifest has changed' if git diff --quiet app/manifest/_base.json; diff --git a/.circleci/scripts/release-create-release-pr.sh b/.circleci/scripts/release-create-release-pr.sh index a1d05c777..9aa5d39bd 100755 --- a/.circleci/scripts/release-create-release-pr.sh +++ b/.circleci/scripts/release-create-release-pr.sh @@ -16,12 +16,6 @@ then exit 1 fi -if [[ -z "${GITHUB_TOKEN:-}" ]] -then - printf '%s\n' 'GITHUB_TOKEN environment variable must be set' - exit 1 -fi - function install_github_cli () { printf '%s\n' 'Installing hub CLI'