From 9a1aaf898c8625730bc89c7dd93dd66a32599faf Mon Sep 17 00:00:00 2001 From: Randy Fay Date: Tue, 12 Nov 2024 19:13:53 -0700 Subject: [PATCH] Try 8, go back to original structure [skip ci] --- .goreleaser.yml | 89 ++++++++++++++++++------------------------------- 1 file changed, 33 insertions(+), 56 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 3b1a0674976..a84103a0367 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -182,42 +182,31 @@ brews: skip_upload: auto dependencies: - name: mkcert + custom_block: | head do url "https://github.com/ddev/ddev.git", branch: "master" depends_on "go" => :build depends_on "make" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = buildpath + end + install: | + if build.head? os = OS.mac? ? "darwin" : "linux" arch = Hardware::CPU.arm? ? "arm64" : "amd64" + # Get the git commit SHA for versioning + git_hash = Utils.git_head + version = "HEAD-" + git_hash[0..7] - # Change to the git checkout directory, which is the last component of the URL - cd("ddev") do - # 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" - end - end - end - - def install - bin.install "ddev" - bash_completion.install "ddev_bash_completion.sh" => "ddev" - zsh_completion.install "ddev_zsh_completion.sh" => "_ddev" - fish_completion.install "ddev_fish_completion.sh" => "ddev.fish" + system "make", "VERSION=#{version}" + system "cp", ".gotmp/bin/#{os}_#{arch}/ddev", "#{bin}/ddev" + 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" + else + bin.install "ddev" + bash_completion.install "ddev_bash_completion.sh" => "ddev" + zsh_completion.install "ddev_zsh_completion.sh" => "_ddev" + fish_completion.install "ddev_fish_completion.sh" => "ddev.fish" end test: | @@ -242,37 +231,25 @@ brews: url "https://github.com/ddev/ddev.git", branch: "master" depends_on "go" => :build depends_on "make" => :build - - def install - ENV["GOPATH"] = buildpath - ENV["GOBIN"] = buildpath + end + install: | + if build.head? os = OS.mac? ? "darwin" : "linux" arch = Hardware::CPU.arm? ? "arm64" : "amd64" + # Get the git commit SHA for versioning + git_hash = Utils.git_head + version = "HEAD-" + git_hash[0..7] - # Change to the git checkout directory, which is the last component of the URL - cd("ddev") do - # 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" - end - end - end - - def install - bin.install "ddev" - bash_completion.install "ddev_bash_completion.sh" => "ddev" - zsh_completion.install "ddev_zsh_completion.sh" => "_ddev" - fish_completion.install "ddev_fish_completion.sh" => "ddev.fish" + system "make", "VERSION=#{version}" + system "cp", ".gotmp/bin/#{os}_#{arch}/ddev", "#{bin}/ddev" + 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" + else + bin.install "ddev" + bash_completion.install "ddev_bash_completion.sh" => "ddev" + zsh_completion.install "ddev_zsh_completion.sh" => "_ddev" + fish_completion.install "ddev_fish_completion.sh" => "ddev.fish" end test: |