Skip to content

Commit

Permalink
Experiment with using nightly.link instead of building from source
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Nov 15, 2024
1 parent 8195c9a commit 3ebc42a
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,26 +186,31 @@ brews:
custom_block: |
head do
url "https://github.com/ddev/ddev.git", branch: "master"
depends_on "go" => :build
depends_on "make" => :build
resource "ddev-binary" do
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
os = OS.mac? ? "macos" : "linux"
url "https://nightly.link/ddev/ddev/workflows/master-build/master/ddev-#{os}-#{arch}.zip"
sha256 "" # We'd need to figure out how to handle this for nightlies
end
end
install: |
if build.head?
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"
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"
resource("ddev-binary").stage do
system "unzip", "-o", Dir["*.zip"].first if Dir["*.zip"].any?
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
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: |
system "#{bin}/ddev --version"
Expand All @@ -226,19 +231,23 @@ brews:
custom_block: |
head do
url "https://github.com/ddev/ddev.git", branch: "master"
depends_on "go" => :build
depends_on "make" => :build
resource "ddev-binary" do
arch = Hardware::CPU.arm? ? "arm64" : "amd64"
os = OS.mac? ? "macos" : "linux"
url "https://nightly.link/ddev/ddev/workflows/master-build/master/ddev-#{os}-#{arch}.zip"
sha256 "" # We'd need to figure out how to handle this for nightlies
end
end
install: |
if build.head?
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"
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"
resource("ddev-binary").stage do
system "unzip", "-o", Dir["*.zip"].first if Dir["*.zip"].any?
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
else
bin.install "ddev"
bash_completion.install "ddev_bash_completion.sh" => "ddev"
Expand Down

0 comments on commit 3ebc42a

Please sign in to comment.