diff --git a/Makefile b/Makefile index 095dda6..07bacbf 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,16 @@ help: @echo "install: Install binary." @echo "clean: Clean up." -build: build_pkgs +build: @mkdir -p ./bin @rm -f ./bin/* go build -o ./bin/sup ./cmd/sup -build_pkgs: - go build ./... +dist: + @mkdir -p ./bin + @rm -f ./bin/* + GOOS=darwin GOARCH=amd64 go build -o ./bin/sup-darwin64 ./cmd/sup + GOOS=linux GOARCH=amd64 go build -o ./bin/sup-linux64 ./cmd/sup test: go test diff --git a/cmd/sup/main.go b/cmd/sup/main.go index 15a6cc1..3c2d494 100644 --- a/cmd/sup/main.go +++ b/cmd/sup/main.go @@ -138,7 +138,7 @@ func main() { flag.Parse() if *showVersionShort || *showVersionLong { - fmt.Println("0.2") + fmt.Println(sup.VERSION) return } diff --git a/sup.go b/sup.go index 8c5e1e5..4e3c755 100644 --- a/sup.go +++ b/sup.go @@ -13,6 +13,8 @@ import ( "golang.org/x/crypto/ssh" ) +const VERSION = "0.2.0" + type Stackup struct { conf *Supfile }