From 4c304c001312802e24da35cfa7c2d277e9ae9133 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Mon, 3 Oct 2016 14:01:15 +0100 Subject: [PATCH] Extract install-wordepress --- bin/circle-deploy-issues | 5 +---- bin/circle-deploy-master | 5 +---- bin/circle-deploy-release | 7 +------ bin/circle-functions | 9 --------- bin/install-wordepress | 12 ++++++++++++ 5 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 bin/circle-functions create mode 100755 bin/install-wordepress diff --git a/bin/circle-deploy-issues b/bin/circle-deploy-issues index 0cf6a053..d8617969 100755 --- a/bin/circle-deploy-issues +++ b/bin/circle-deploy-issues @@ -3,8 +3,6 @@ set -e set -o pipefail -source "$(dirname "$(readlink -f "$0")")/circle-functions" - source "$STATE" site_changes() { @@ -33,9 +31,8 @@ post_comment() { https://api.github.com/repos/weaveworks/weave/issues/$GH_PR/comments > /dev/null } -install_wordepress v1.0.0 - cd $SRCDIR +bin/install-wordepress v1.0.0 bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" if [ -n "$WP_GH_COMMENT_TOKEN" -a -n "$GH_PR" ] ; then diff --git a/bin/circle-deploy-master b/bin/circle-deploy-master index 14b484cb..3f6247b4 100755 --- a/bin/circle-deploy-master +++ b/bin/circle-deploy-master @@ -2,8 +2,6 @@ set -e -source "$(dirname "$(readlink -f "$0")")/circle-functions" - source "$STATE" if [ -z "$SKIP_TESTS" ] ; then @@ -13,7 +11,6 @@ if [ -z "$SKIP_TESTS" ] ; then make publish fi -install_wordepress v1.0.0 - cd $SRCDIR +bin/install-wordepress v1.0.0 bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" diff --git a/bin/circle-deploy-release b/bin/circle-deploy-release index 1e29a2fe..d7db8d44 100755 --- a/bin/circle-deploy-release +++ b/bin/circle-deploy-release @@ -2,11 +2,6 @@ set -e -source "$(dirname "$(readlink -f "$0")")/circle-functions" - -source "$STATE" - -install_wordepress v1.0.0 - cd $SRCDIR +bin/install-wordepress v1.0.0 bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD" diff --git a/bin/circle-functions b/bin/circle-functions deleted file mode 100644 index 8ed249cd..00000000 --- a/bin/circle-functions +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -install_wordepress() { - go get github.com/weaveworks/wordepress - cd /home/ubuntu/src/github.com/weaveworks/wordepress - git checkout $1 - cd cmd/wordepress - go get -} diff --git a/bin/install-wordepress b/bin/install-wordepress new file mode 100755 index 00000000..89562d8b --- /dev/null +++ b/bin/install-wordepress @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ $# -ne 1 ] ; then + echo USAGE: install-wordepress [COMMIT-ISH] >&2 + exit 1 +fi + +go get github.com/weaveworks/wordepress +cd /home/ubuntu/src/github.com/weaveworks/wordepress +git checkout $1 +cd cmd/wordepress +go get