From 327a6f6d61a0c1be8c4c7853978bcc68e80f819a Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Thu, 28 Apr 2016 17:50:32 +0100 Subject: [PATCH 1/2] Upgrade to Wordepress 1.0.0 Release docs will now also be available with a stable 'latest' URL. --- bin/publish-site | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bin/publish-site b/bin/publish-site index 024c64f3..927309e4 100755 --- a/bin/publish-site +++ b/bin/publish-site @@ -21,6 +21,7 @@ fi case "$BRANCH" in issues/*) VERSION="${BRANCH#issues/}" + TAGS="$VERSION" ;; *) if echo "$BRANCH" | grep -qE '^[0-9]+\.[0-9]+' ; then @@ -28,12 +29,18 @@ case "$BRANCH" in if ! VERSION=$(echo "$DESCRIBE" | grep -oP '(?<=^v)[0-9]+\.[0-9]+\.[0-9]+') ; then fatal "Could not infer latest $BRANCH version from $DESCRIBE" fi + TAGS="$VERSION latest" else VERSION="$BRANCH" + TAGS="$VERSION" fi ;; esac -echo ">>> Publishing $PRODUCT $VERSION site to $1" - -wordepress --url "$1" --user "$2" --password "$3" --product "$PRODUCT" --version "$VERSION" publish site +for TAG in $TAGS ; do + echo ">>> Publishing $PRODUCT $VERSION to $1/docs/$PRODUCT/$TAG" + wordepress \ + --url "$1" --user "$2" --password "$3" \ + --product "$PRODUCT" --version "$VERSION" --tag "$TAG" \ + publish site +done From 1d5261545241a819fd3dc534adc66029d3082176 Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Wed, 4 May 2016 11:07:12 +0100 Subject: [PATCH 2/2] Pin all branches to Wordepress 1.0.0 --- circle.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/circle.yml b/circle.yml index eb81a722..f5d2c147 100644 --- a/circle.yml +++ b/circle.yml @@ -62,17 +62,17 @@ deployment: - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS - cd $SRCDIR; make clean-bin - cd $SRCDIR; make publish - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout master && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" issues: branch: /issues\/.*/ owner: weaveworks commands: - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout master && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_DEV_URL" "$WP_DEV_USER" "$WP_DEV_PASSWORD" release: branch: /[0-9]+\.[0-9]+/ owner: weaveworks commands: - - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v0.1.0 && cd cmd/wordepress && go get + - go get github.com/weaveworks/wordepress && cd /home/ubuntu/src/github.com/weaveworks/wordepress && git checkout v1.0.0 && cd cmd/wordepress && go get - cd $SRCDIR; bin/publish-site "$WP_LIVE_URL" "$WP_LIVE_USER" "$WP_LIVE_PASSWORD"