Skip to content
This repository has been archived by the owner on Aug 3, 2020. It is now read-only.

Commit

Permalink
Add version, address rancher/rancher#1551
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Jul 15, 2015
1 parent a79e4bd commit 6c22a43
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 2 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,16 @@ import (
cliApp "github.com/docker/libcompose/app"
"github.com/docker/libcompose/command"
"github.com/rancherio/rancher-compose/app"
"github.com/rancherio/rancher-compose/version"
)

var VERSION = "0.0.0-dev"

func main() {
factory := &app.ProjectFactory{}

app := cli.NewApp()
app.Name = "rancher-compose"
app.Usage = "Docker-compose to Rancher"
app.Version = VERSION
app.Version = version.VERSION
app.Author = "Rancher Labs, Inc."
app.Email = ""
app.Before = cliApp.BeforeApp
Expand Down
4 changes: 2 additions & 2 deletions scripts/build
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ get_version
echo export GOPATH=$GOPATH
echo VERSION=$VERSION

go build -ldflags="-w -X github.com/docker/libcompose.VERSION $VERSION" -o bin/${PROJECT}
go build -ldflags="-w -X github.com/rancherio/rancher-compose/version.VERSION $VERSION" -o bin/${PROJECT}

if [ -n "$BUILD_CROSS" ]; then
rm -rf build/bin
mkdir -p build/bin
gox -os="darwin linux windows" -arch="386 amd64 arm" -output="build/bin/rancher-compose_{{.OS}}-{{.Arch}}" -ldflags="-w -X github.com/docker/libcompose.VERSION $VERSION"
gox -os="darwin linux windows" -arch="386 amd64 arm" -output="build/bin/rancher-compose_{{.OS}}-{{.Arch}}" -ldflags="-w -X github.com/rancherio/rancher-compose/version.VERSION $VERSION"
fi
3 changes: 3 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package version

var VERSION = "0.0.0-dev"

0 comments on commit 6c22a43

Please sign in to comment.