Skip to content

Commit 6a2af41

Browse files
committed
fix homebrew formula
1 parent a65eaa5 commit 6a2af41

File tree

1 file changed

+9
-3
lines changed
  • contrib/builder/homebrew

1 file changed

+9
-3
lines changed

contrib/builder/homebrew/scw.rb

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,29 @@
33
class Scw < Formula
44
desc "Manage BareMetal Servers from Command Line (as easily as with Docker)"
55
homepage "https://github.com/scaleway/scaleway-cli"
6-
url "https://github.com/scaleway/scaleway-cli/archive/v1.6.0.tar.gz"
7-
sha256 "5772c03b6599644c84bf47aed7a3c1d080af2c87df0ef30d37cd4a991d72567f"
6+
url "https://github.com/scaleway/scaleway-cli/archive/v1.7.0.tar.gz"
7+
sha256 "c1afa976301e8b2e8ce6b4c4f306cbfee5171f3a17f3083149e338c2ada774a5"
88

99
head "https://github.com/scaleway/scaleway-cli.git"
1010

1111
depends_on "go" => :build
1212

13+
go_resource "github.com/Sirupsen/logrus" do
14+
url "https://github.com/Sirupsen/logrus.git", revision: "f7f79f729e0fbe2fcc061db48a9ba0263f588252"
15+
end
16+
1317
def install
1418
ENV["GOPATH"] = buildpath
1519
ENV["CGO_ENABLED"] = "0"
20+
ENV["GO15VENDOREXPERIMENT"] = "1"
1621
ENV.prepend_create_path "PATH", buildpath/"bin"
1722

1823
mkdir_p buildpath/"src/github.com/scaleway"
1924
ln_s buildpath, buildpath/"src/github.com/scaleway/scaleway-cli"
2025
Language::Go.stage_deps resources, buildpath/"src"
2126

22-
system "make", "build"
27+
version = `cat .goxc.json | grep "PackageVersion" | egrep -o "([0-9]{1,}\.)+[0-9]{1,}"`
28+
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"
2329
bin.install "scw"
2430

2531
bash_completion.install "contrib/completion/bash/scw"

0 commit comments

Comments
 (0)