Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
verdverm committed May 9, 2023
1 parent d43085b commit 9ca6002
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
22 changes: 11 additions & 11 deletions hof.cue
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ package main

import "strings"

name: "hof"
version: tag
tag: "v0.6.8-beta.12"
commit: "475328015adf6d102e5227a646e63f6a2b23119f"
desc: "A flexible data modeling & code generation system"
name: "hof"
version: tag
tag: "v0.6.8-rc.1"
commit: "d11b312c5741ecb5e98a66eb1e91cd814df1582d"
desc: "CUE powered data modeling & code generation system"
homepage: "https://hofstadter.io/"
repo: "github.com/hofstadter-io/hof"
url: "https://\(repo).git"
license: "BSD-3-Clause"
branch: "_dev"
cmddir: "cmd/hof"
ldflags: strings.Replace("""
repo: "github.com/hofstadter-io/hof"
url: "https://\(repo).git"
license: "BSD-3-Clause"
branch: "_dev"
cmddir: "cmd/hof"
ldflags: strings.Replace("""
-s -w
-X \(repo)/\(cmddir)/verinfo.Version=#{version}
-X \(repo)/\(cmddir)/verinfo.Commit=#{Utils.git_head}
Expand Down
32 changes: 21 additions & 11 deletions hof.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
class Hof < Formula
desc "A flexible data modeling & code generation system"
desc "CUE powered data modeling & code generation system"
homepage "https://hofstadter.io/"
version "v0.6.8-beta.12"
version "v0.6.8-rc.1"
url "https://github.com/hofstadter-io/hof.git",
tag: "v0.6.8-beta.12",
revision: "475328015adf6d102e5227a646e63f6a2b23119f"
tag: "v0.6.8-rc.1",
revision: "d11b312c5741ecb5e98a66eb1e91cd814df1582d"
license "BSD-3-Clause"
head "https://github.com/hofstadter-io/hof.git", branch: "_dev"

Expand All @@ -15,22 +15,32 @@ def install
arch = Hardware::CPU.intel? ? "amd64" : Hardware::CPU.arch.to_s
os = OS.kernel_name.downcase

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} ]
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"
system "go", "build", *std_go_args(ldflags: ldflags), "./cmd/hof"

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

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

system bin/"hof", "mod", "init", "cue", "brew.sh/brewtest"
assert_equal "module: \"brew.sh/brewtest\"", (testpath/"cue.mod/module.cue").read.chomp

assert_match version.to_s, shell_output(bin/"hof version")
end
end

0 comments on commit 9ca6002

Please sign in to comment.