diff --git a/GH-Release.sh b/GH-Release.sh index 90aeb2ca..7a65ba87 100755 --- a/GH-Release.sh +++ b/GH-Release.sh @@ -1,12 +1,12 @@ #!/bin/bash -set -e +set -e # create JSON TMP_JSON=/tmp/GH-Publish.json BASE_VERSION=`node -pe "($(cat package.json)).version"` VERSION="${BASE_VERSION%%.0}.`git rev-list HEAD --count`" # "%%.0" strips trailing ".0" -if ! [ $GHTOKEN ]; then +if ! [ "$GHTOKEN" ]; then echo 'Please put your GitHub API Token in an environment variable named GHTOKEN' exit 1 fi diff --git a/Jenkinsfile b/Jenkinsfile index 586b6864..18d15db2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -64,7 +64,7 @@ stage ('Copy Install Images') { stage ('Upload to installers to Github') { node('Linux && sharedworkspace && NodeJS') { exws (extWorkspace) { - withCredentials([string(credentialsId: '16dda99e-77d1-462d-a7c8-385eb2dd2ef7', variable: 'GHTOKEN')]) { + withCredentials([usernamePassword(credentialsId: '9f5481da-1a4d-4c5d-b400-cc2ee3a3ac2c', passwordVariable: 'GHTOKEN', usernameVariable: 'API')]) { sh './GH-Release.sh' } }