Skip to content

Commit

Permalink
Try 8, go back to original structure [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Nov 14, 2024
1 parent a3ecd4e commit 9a1aaf8
Showing 1 changed file with 33 additions and 56 deletions.
89 changes: 33 additions & 56 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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: |
Expand Down

0 comments on commit 9a1aaf8

Please sign in to comment.