From 0d727300f573ed5aba12b513359205517f1da68a Mon Sep 17 00:00:00 2001 From: Gemma Leigh Date: Wed, 22 Mar 2017 17:19:12 +0000 Subject: [PATCH 1/2] Make create-release.sh consistent with FET - Split the openssl command onto two lines - Use an environment variable for the repo name - Add missing comments for latest-release branch --- create-release.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/create-release.sh b/create-release.sh index d18ae87e1..6aa082f58 100755 --- a/create-release.sh +++ b/create-release.sh @@ -1,14 +1,17 @@ #!/bin/bash set -e -echo "Add config for alphagov/govuk_elements" +REPO_PATH='govuk_elements' + +echo "Add config for alphagov/$REPO_PATH" git config --global user.name "Travis CI" git config --global user.email "travis@travis-ci.org" -git remote add origin_ssh git@github.com:alphagov/govuk_elements.git +git remote add origin_ssh git@github.com:REPO_PATH.git # This openssl command was generated automatically by `travis encrypt-file`, see `.travis/README.md` for more details -openssl aes-256-cbc -K $encrypted_85ebe8034b89_key -iv $encrypted_85ebe8034b89_iv -in .travis/govuk_elements.enc -out ~/.ssh/id_rsa -d && chmod 600 ~/.ssh/id_rsa +openssl aes-256-cbc -K $encrypted_85ebe8034b89_key -iv $encrypted_85ebe8034b89_iv -in .travis/govuk_elements.enc -out ~/.ssh/id_rsa -d +chmod 600 ~/.ssh/id_rsa echo "Check to see if the version file has been updated" @@ -28,6 +31,7 @@ if ! git rev-parse $VERSION_TAG >/dev/null 2>&1; then # This tag will trigger the builds for the deploy providers marked "# For tagged commits" in .travis.yml + # Alias branch for the most recently released tag, for easier diffing # Force push local `master` branch to the `latest-release` branch on Github git push --force origin_ssh master:latest-release echo "Pushed latest-release branch to GitHub" From 0b006d8a2f5558a4e12740f4d196ac79f787172d Mon Sep 17 00:00:00 2001 From: Gemma Leigh Date: Wed, 22 Mar 2017 17:53:35 +0000 Subject: [PATCH 2/2] Fix environment variable - REPO_PATH This was missing the organisation alphagov and also missing the $ to output the environment variable. --- create-release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/create-release.sh b/create-release.sh index 6aa082f58..85cf757a8 100755 --- a/create-release.sh +++ b/create-release.sh @@ -1,13 +1,13 @@ #!/bin/bash set -e -REPO_PATH='govuk_elements' +REPO_PATH='alphagov/govuk_elements' echo "Add config for alphagov/$REPO_PATH" git config --global user.name "Travis CI" git config --global user.email "travis@travis-ci.org" -git remote add origin_ssh git@github.com:REPO_PATH.git +git remote add origin_ssh git@github.com:$REPO_PATH.git # This openssl command was generated automatically by `travis encrypt-file`, see `.travis/README.md` for more details openssl aes-256-cbc -K $encrypted_85ebe8034b89_key -iv $encrypted_85ebe8034b89_iv -in .travis/govuk_elements.enc -out ~/.ssh/id_rsa -d