diff --git a/Makefile b/Makefile index 4f4f066..9247e60 100644 --- a/Makefile +++ b/Makefile @@ -8,14 +8,16 @@ debug: DEBUG=1 go run main.go # http://macappstore.org/upx -build: clean +build/mac: clean + env GOARCH=amd64 go build -ldflags "-s -w" -o bin/macos/cointop && upx bin/macos/cointop + +build/multiple: clean env GOARCH=amd64 go build -ldflags "-s -w" -o bin/cointop64 && upx bin/cointop64 && \ env GOARCH=386 go build -ldflags "-s -w" -o bin/cointop32 && upx bin/cointop32 clean: go clean && \ - rm -f bin/cointop64 && \ - rm -f bin/cointop32 + rm -rf bin/ test: go test ./... @@ -35,8 +37,15 @@ snap/deploy: snap/remove: snap remove cointop +brew/clean: brew/remove + brew cleanup --force cointop + brew prune + brew/remove: - brew uninstall cointop + brew uninstall --force cointop brew/build: brew/remove brew install --build-from-source cointop.rb + +brew/audit: + brew audit --strict cointop.rb diff --git a/bin/macos/cointop b/bin/macos/cointop new file mode 100755 index 0000000..d85e01e Binary files /dev/null and b/bin/macos/cointop differ diff --git a/cointop.rb b/cointop.rb index 92cb959..6f9de7d 100644 --- a/cointop.rb +++ b/cointop.rb @@ -1,20 +1,20 @@ -require "language/go" - class Cointop < Formula - desc "An interactive terminal based UI application for tracking cryptocurrencies" + desc "Interactive terminal based UI application for tracking cryptocurrencies" homepage "https://cointop.sh" - url "https://github.com/miguelmota/cointop/archive/0.0.1.tar.gz" - sha256 "3b2b039da68c92d597ae4a6a89aab58d9741132efd514bbf5cf1a1a151b16213" + url "https://github.com/miguelmota/cointop/archive/1.0.0.tar.gz" + sha256 "8ff6988cd18b35dbf85436add19135a587e03702b43744f563f137bb067f6e04" revision 1 head "https://github.com/miguelmota/cointop.git" depends_on "go" => :build def install ENV["GOPATH"] = buildpath - path = buildpath/"src/github.com/miguelmota/cointop" - system "go", "get", "-u", "github.com/miguelmota/cointop" + path = buildpath/"src/github.com/miguelmota" + #system "go", "get", "-u", "github.com/miguelmota/cointop" cd path do - system "go", "build", "-o", "#{bin}/cointop" + system "git", "clone", "https://github.com/miguelmota/cointop.git" + system "mv", "bin/macos/cointop", "#{bin}/cointop" + #system "go", "build", "-o", "#{bin}/cointop" end end diff --git a/cointop/cointop.go b/cointop/cointop.go index 8846447..01ab69b 100644 --- a/cointop/cointop.go +++ b/cointop/cointop.go @@ -66,7 +66,7 @@ func Run() { flag.BoolVar(&ver, "v", false, "Version") flag.Parse() if ver { - fmt.Println("cointop version 1.0.0") + fmt.Println("1.0.0") return } var debug bool