From 521cac7843ac454f542abc09fd6df8cde0f81f1f Mon Sep 17 00:00:00 2001 From: Quentin Perez Date: Thu, 28 Jan 2016 13:08:09 +0100 Subject: [PATCH] fix homebrew formula --- Makefile | 2 +- contrib/builder/homebrew/scw.rb | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index b941dce37e..6a92771a58 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ PACKAGES := $(shell go list ./... | grep -v /vendor/ | grep -v /cmd/) REL_COMMANDS := $(subst $(GODIR),./,$(COMMANDS)) REL_PACKAGES := $(subst $(GODIR),./,$(PACKAGES)) VERSION = $(shell cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}") -REV = $(shell git rev-parse HEAD || git ls-remote https://github.com/scaleway/scaleway-cli | grep -F $(VERSION) | head -n1 | awk '{print $$1}' || echo "nogit") +REV = $(shell git rev-parse HEAD || echo "nogit") TAG = $(shell git describe --tags --always || echo $(VERSION) || echo "nogit") LDFLAGS = "-X github.com/scaleway/scaleway-cli/pkg/scwversion.GITCOMMIT=$(REV) \ -X github.com/scaleway/scaleway-cli/pkg/scwversion.VERSION=$(TAG)" diff --git a/contrib/builder/homebrew/scw.rb b/contrib/builder/homebrew/scw.rb index 466359ae62..0ba73b0bff 100644 --- a/contrib/builder/homebrew/scw.rb +++ b/contrib/builder/homebrew/scw.rb @@ -10,10 +10,6 @@ class Scw < Formula depends_on "go" => :build - go_resource "github.com/Sirupsen/logrus" do - url "https://github.com/Sirupsen/logrus.git", revision: "f7f79f729e0fbe2fcc061db48a9ba0263f588252" - end - def install ENV["GOPATH"] = buildpath ENV["CGO_ENABLED"] = "0" @@ -24,8 +20,7 @@ def install ln_s buildpath, buildpath/"src/github.com/scaleway/scaleway-cli" Language::Go.stage_deps resources, buildpath/"src" - version = `cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}"` - system "go", "build", "-ldflags", "-X github.com/scaleway/scaleway-cli/pkg/scwversion.GITCOMMIT=homebrew -X github.com/scaleway/scaleway-cli/pkg/scwversion.VERSION=#{version}", "./cmd/scw" + system "go", "build", "-ldflags", "-X github.com/scaleway/scaleway-cli/pkg/scwversion.GITCOMMIT=homebrew", "./cmd/scw" bin.install "scw" bash_completion.install "contrib/completion/bash/scw"