Skip to content

Commit

Permalink
update version, incorp some changes from homebrew-core formula
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed Sep 17, 2022
1 parent bde382d commit c48952f
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 56 deletions.
13 changes: 4 additions & 9 deletions .hof/shadow/AdhocGen/hof.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Hof < Formula
desc "Flexible data modeling & code generation system"
homepage "https://hofstadter.io/"
version "0.6.6"
version "0.6.7-beta.1"
url "https://github.com/hofstadter-io/hof.git",
tag: "v0.6.6",
revision: "0f49b4d71a66788b006daacf905a2b138768beca"
tag: "v0.6.7-beta.1",
revision: "4233c2632c8fd007dd38d732928b13de7c803537"
license "BSD-3-Clause"
head "https://github.com/hofstadter-io/hof.git", branch: "_dev"

Expand All @@ -21,12 +21,7 @@ def install
ENV["HOF_TELEMETRY_DISABLED"] = 1
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/hof"

bash_output = Utils.safe_popen_read(bin/"hof", "completion", "bash")
(bash_completion/"hof").write bash_output
zsh_output = Utils.safe_popen_read(bin/"hof", "completion", "zsh")
(zsh_completion/"_hof").write zsh_output
fish_output = Utils.safe_popen_read(bin/"hof", "completion", "fish")
(fish_completion/"hof.fish").write fish_output
generate_completions_from_executable(bin/"hof", "completion")
end

test do
Expand Down
35 changes: 3 additions & 32 deletions hof.cue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import "strings"

name: "hof"
version: "0.6.6"
tag: "v0.6.6"
commit: "0f49b4d71a66788b006daacf905a2b138768beca"
version: "0.6.7-beta.1"
tag: "v0.6.7-beta.1"
commit: "4233c2632c8fd007dd38d732928b13de7c803537"
desc: "Flexible data modeling & code generation system"
homepage: "https://hofstadter.io/"
repo: "github.com/hofstadter-io/hof"
Expand All @@ -22,32 +22,3 @@ ldflags: strings.Replace("""
-X \(repo)/\(cmddir)/verinfo.BuildOS=#{os}
-X \(repo)/\(cmddir)/verinfo.BuildArch=#{arch}
""", "\n", " ", -1)

builds: {
[os=string]: [arch=string]: {
"name": name

_url: "https://\(repo)/releases/download/\(tag)/\(name)_\(version)"
sha256: string
}
linux: {
intel: A={
url: "\(A._url)_Linux_x86_64"
sha256: "581958cf7a69c2b9dc541ad0aac25396f7705d1533f89a90ab4a4b27a1128131"
}
arm: A={
url: "\(A._url)_Linux_arm64"
sha256: "01c13dbd5d2dc3eaa573d5400c2a013d3fd0fe2b4de8f499c0bef3f10c90cc12"
}
}
macos: {
intel: A={
url: "\(A._url)_Darwin_x86_64"
sha256: "e1cf5a28e07c34a4aa1dbd7f2c0149a4d76f3450e14e5c0ff1e28813e48bf33b"
}
arm: A={
url: "\(A._url)_Darwin_arm64"
sha256: "124ad1d08c959690510a8983ac283b4c4ffafda2378768e89af2cd3af7226b54"
}
}
}
13 changes: 4 additions & 9 deletions hof.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Hof < Formula
desc "Flexible data modeling & code generation system"
homepage "https://hofstadter.io/"
version "0.6.6"
version "0.6.7-beta.1"
url "https://github.com/hofstadter-io/hof.git",
tag: "v0.6.6",
revision: "0f49b4d71a66788b006daacf905a2b138768beca"
tag: "v0.6.7-beta.1",
revision: "4233c2632c8fd007dd38d732928b13de7c803537"
license "BSD-3-Clause"
head "https://github.com/hofstadter-io/hof.git", branch: "_dev"

Expand All @@ -21,12 +21,7 @@ def install
ENV["HOF_TELEMETRY_DISABLED"] = 1
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/hof"

bash_output = Utils.safe_popen_read(bin/"hof", "completion", "bash")
(bash_completion/"hof").write bash_output
zsh_output = Utils.safe_popen_read(bin/"hof", "completion", "zsh")
(zsh_completion/"_hof").write zsh_output
fish_output = Utils.safe_popen_read(bin/"hof", "completion", "fish")
(fish_completion/"hof.fish").write fish_output
generate_completions_from_executable(bin/"hof", "completion")
end

test do
Expand Down
1 change: 1 addition & 0 deletions templates/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def install
ldflags = %W[ {{ .ldflags }} ]

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

bash_output = Utils.safe_popen_read(bin/"{{ .name }}", "completion", "bash")
Expand Down
7 changes: 1 addition & 6 deletions templates/from-git-source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ def install
ENV["{{ upper .name }}_TELEMETRY_DISABLED"] = 1
system "go", "build", *std_go_args(ldflags: ldflags), "./{{ .cmddir }}"

bash_output = Utils.safe_popen_read(bin/"{{ .name }}", "completion", "bash")
(bash_completion/"{{ .name }}").write bash_output
zsh_output = Utils.safe_popen_read(bin/"{{ .name }}", "completion", "zsh")
(zsh_completion/"_{{ .name }}").write zsh_output
fish_output = Utils.safe_popen_read(bin/"{{ .name }}", "completion", "fish")
(fish_completion/"{{ .name }}.fish").write fish_output
generate_completions_from_executable(bin/"{{ .name }}", "completion")
end

test do
Expand Down

0 comments on commit c48952f

Please sign in to comment.