From 70bd0ade45dfb3b1d4703a155f7e8740239b3764 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 20 Apr 2016 12:21:01 +0100 Subject: [PATCH 1/3] Identifier "_" is address, not cidr --- ipam/claim.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipam/claim.go b/ipam/claim.go index 467a182e..9869bc8a 100644 --- a/ipam/claim.go +++ b/ipam/claim.go @@ -72,14 +72,14 @@ func (c *claim) Try(alloc *Allocator) bool { return false } + if c.ident == "_" { // Special "I don't have a unique ID" identifier + c.ident = c.cidr.Addr.String() + } // We are the owner, check we haven't given it to another container switch existingIdent := alloc.findOwner(c.cidr.Addr); existingIdent { case "": if err := alloc.space.Claim(c.cidr.Addr); err == nil { alloc.debugln("Claimed", c.cidr, "for", c.ident) - if c.ident == "_" { // Special "I don't have a unique ID" identifier - c.ident = c.cidr.String() - } alloc.addOwned(c.ident, c.cidr, c.isContainer) c.sendResult(nil) } else { @@ -89,7 +89,7 @@ func (c *claim) Try(alloc *Allocator) bool { // same identifier is claiming same address; that's OK alloc.debugln("Re-Claimed", c.cidr, "for", c.ident) c.sendResult(nil) - case c.cidr.String(): + case c.cidr.Addr.String(): // Address already allocated via "_" name c.sendResult(fmt.Errorf("address %s already in use", c.cidr)) default: From 327a6f6d61a0c1be8c4c7853978bcc68e80f819a Mon Sep 17 00:00:00 2001 From: Adam Harrison Date: Thu, 28 Apr 2016 17:50:32 +0100 Subject: [PATCH 2/3] 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 3/3] 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"