Skip to content

Commit

Permalink
Try 5, try for a good version hash [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Nov 15, 2024
1 parent 502f208 commit 49ef7e6
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,21 @@ brews:
depends_on "make" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GOBIN"] = buildpath
os = OS.mac? ? "darwin" : "linux"
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
system "mkdir", "-p", "#{bin}"
system "make", "build", "completions"
system "cp", ".gotmp/bin/" + os + "_" + arch + "/ddev", "#{bin}/ddev"
# Get the git commit SHA for versioning
git_hash = Utils.git_head
version = "HEAD-" + git_hash[0..7]
system "make", "VERSION=#{version}"
# Install the compiled binary
bin.install ".gotmp/bin/#{os}_#{arch}/ddev"
# Install completions
bash_completion.install ".gotmp/bin/completions/ddev_bash_completion.sh" => "ddev"
zsh_completion.install ".gotmp/bin/completions/ddev_zsh_completion.sh" => "_ddev"
fish_completion.install ".gotmp/bin/completions/ddev_fish_completion.sh" => "ddev.fish"
Expand All @@ -207,7 +217,6 @@ brews:
fish_completion.install "ddev_fish_completion.sh" => "ddev.fish"
end
test: |
system "#{bin}/ddev --version"
Expand All @@ -232,11 +241,21 @@ brews:
depends_on "make" => :build
def install
ENV["GOPATH"] = buildpath
ENV["GOBIN"] = buildpath
os = OS.mac? ? "darwin" : "linux"
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
system "mkdir", "-p", "#{bin}"
system "make", "build", "completions"
system "cp", ".gotmp/bin/" + os + "_" + arch + "/ddev", "#{bin}/ddev"
# Get the git commit SHA for versioning
git_hash = Utils.git_head
version = "HEAD-" + git_hash[0..7]
system "make", "VERSION=#{version}"
# Install the compiled binary
bin.install ".gotmp/bin/#{os}_#{arch}/ddev"
# Install completions
bash_completion.install ".gotmp/bin/completions/ddev_bash_completion.sh" => "ddev"
zsh_completion.install ".gotmp/bin/completions/ddev_zsh_completion.sh" => "_ddev"
fish_completion.install ".gotmp/bin/completions/ddev_fish_completion.sh" => "ddev.fish"
Expand Down

0 comments on commit 49ef7e6

Please sign in to comment.