Skip to content

Commit

Permalink
string not int
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed Sep 23, 2022
1 parent d591e7a commit 07f4017
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hof.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def install
ldflags = %W[ -s -w -X github.com/hofstadter-io/hof/cmd/hof/verinfo.Version=#{version} -X github.com/hofstadter-io/hof/cmd/hof/verinfo.Commit=#{Utils.git_head} -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildDate=#{time.iso8601} -X github.com/hofstadter-io/hof/cmd/hof/verinfo.GoVersion=#{Formula["go"].version} -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildOS=#{os} -X github.com/hofstadter-io/hof/cmd/hof/verinfo.BuildArch=#{arch} ]

ENV["CGO_ENABLED"] = "0"
ENV["HOF_TELEMETRY_DISABLED"] = 1
ENV["HOF_TELEMETRY_DISABLED"] = "1"
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/hof"

generate_completions_from_executable(bin/"hof", "completion")
end

test do
ENV["HOF_TELEMETRY_DISABLED"] = 1
ENV["HOF_TELEMETRY_DISABLED"] = "1"
assert_match "v#{version}", shell_output("#{bin}/hof version")

system bin/"hof", "mod", "init", "cue", "brew.sh/brewtest"
Expand Down
4 changes: 2 additions & 2 deletions templates/from-git-source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ def install
ldflags = %W[ {{ .ldflags }} ]

ENV["CGO_ENABLED"] = "0"
ENV["{{ upper .name }}_TELEMETRY_DISABLED"] = 1
ENV["{{ upper .name }}_TELEMETRY_DISABLED"] = "1"
system "go", "build", *std_go_args(ldflags: ldflags), "./{{ .cmddir }}"

generate_completions_from_executable(bin/"{{ .name }}", "completion")
end

test do
ENV["{{ upper .name }}_TELEMETRY_DISABLED"] = 1
ENV["{{ upper .name }}_TELEMETRY_DISABLED"] = "1"
assert_match "v#{version}", shell_output("#{bin}/{{ .name }} version")
end
end

0 comments on commit 07f4017

Please sign in to comment.