Juju

Rebuilding Juju Binaries from Source

UPDATE: 2015-01-13 – A few corrections after Juju source code has migrated to GitHub.

If you are using the current development version of Juju and making changes to try things out, you should rebuild the binaries before attempting to call juju bootstrap --upload-tools again. Otherwise, you’ll end up using some preexisting, quite possibly old binaries found in $PATH.

I use this handy little script to rebuild them:

You might need to change line 2 if your juju source is elsewhere,  if $GOPATH is not set , or if it contains more than one path – e.g. mine is in ~/work/juju-core.

I called this script rebuild-juju and saved if somewhere listed in $PATH, so I can run it from anywhere. It has the nice feature of restoring back your current directory when done and lists the built binaries, so you can see the modification timestamps.

2 Comments

  • rog
    February 27, 2014 - 15:26 | Permalink

    Apart from the ls, this could be:

    go install launchpad.net/juju-core/cmd/juju{d,}

    or just:

    go install launchpad.net/juju-core/cmd/...

    Both of these have the advantage that you don’t
    need to change the script if you use a different GOPATH.

    • dimitern
      February 27, 2014 - 17:20 | Permalink

      Yeah, that’s a good alternative, thanks Rog!

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    Powered by: Wordpress