Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2642 from weaveworks/fix-launch-version
Browse files Browse the repository at this point in the history
Fix weave-kube launch.sh version usage
  • Loading branch information
awh committed Nov 23, 2016
2 parents 664ba87 + 937036a commit 01c436a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion prog/plugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"github.com/weaveworks/weave/plugin/skel"
)

var version = "(unreleased version)"
var version = "unreleased"

var Log = common.Log

Expand Down
8 changes: 4 additions & 4 deletions prog/weave-kube/launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ fi
echo 1 > /proc/sys/net/bridge/bridge-nf-call-iptables

SOURCE_BINARY=/usr/bin/weaveutil
VERSION=$(/home/weave/weaver --version | sed -E 's/weave router (.*?)/\1/')
VERSION=$(/home/weave/weaver $EXTRA_ARGS --version | sed -e 's/weave router //')
PLUGIN="weave-plugin-$VERSION"

install_cni_plugin() {
mkdir -p $1 || return 1
if [ ! -f $1/$PLUGIN ]; then
cp "$SOURCE_BINARY" $1/$PLUGIN
if [ ! -f "$1/$PLUGIN" ]; then
cp "$SOURCE_BINARY" "$1/$PLUGIN"
fi
}

upgrade_cni_plugin_symlink() {
# Remove potential temporary symlink from previous failed upgrade:
rm -f $1/$2.tmp
# Atomically create a symlink to the plugin:
ln -s $1/$PLUGIN $1/$2.tmp && mv -f $1/$2.tmp $1/$2
ln -s "$1/$PLUGIN" $1/$2.tmp && mv -f $1/$2.tmp $1/$2
}

upgrade_cni_plugin() {
Expand Down
2 changes: 1 addition & 1 deletion prog/weave-npc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

var (
version = "(unreleased)"
version = "unreleased"
metricsAddr string
)

Expand Down
2 changes: 1 addition & 1 deletion prog/weaveproxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/weaveworks/weave/proxy"
)

var version = "(unreleased version)"
var version = "unreleased"

var Log = common.Log

Expand Down
2 changes: 1 addition & 1 deletion prog/weaver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
weave "github.com/weaveworks/weave/router"
)

var version = "(unreleased version)"
var version = "unreleased"

var Log = common.Log

Expand Down
2 changes: 1 addition & 1 deletion site/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ latest snapshot release using:
sudo chmod a+x /usr/local/bin/weave
weave setup

Snapshot releases report the script version as "(unreleased version)",
Snapshot releases report the script version as "unreleased",
and the container image versions as git hashes.


Expand Down
4 changes: 2 additions & 2 deletions weave
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set -e

[ -n "$WEAVE_DEBUG" ] && set -x

SCRIPT_VERSION="(unreleased version)"
SCRIPT_VERSION="unreleased"
IMAGE_VERSION=latest
[ "$SCRIPT_VERSION" = "(unreleased version)" ] || IMAGE_VERSION=$SCRIPT_VERSION
[ "$SCRIPT_VERSION" = "unreleased" ] || IMAGE_VERSION=$SCRIPT_VERSION
IMAGE_VERSION=${WEAVE_VERSION:-$IMAGE_VERSION}

# - Docker versions prior to 1.6 cannot pull images from DockerHub
Expand Down

0 comments on commit 01c436a

Please sign in to comment.