Skip to content

Add helmfile 0.171.0 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions Formula/helmfile.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
class Helmfile < Formula
desc "Deploy Kubernetes Helm Charts"
homepage "https://github.com/helmfile/helmfile"
url "https://github.com/helmfile/helmfile/archive/refs/tags/v0.171.0.tar.gz"
sha256 "593c51bc5b4e422d347706e1785f3ac2044b437369703907fb120b6ca23d333d"
license "MIT"
version_scheme 1

depends_on "go" => :build
depends_on "helm"

bottle do
root_url "https://github.com/Fullscript/homebrew-tools/releases/download/bottles"
sha256 cellar: :any_skip_relocation, arm64_sequoia: "11193f864c4e4409addadc9881e0cecb77bfaa1fb3b4ca1649eaae1073acc6f2"
end

def install
ldflags = %W[
-s -w
-X go.szostok.io/version.version=v#{version}
-X go.szostok.io/version.buildDate=#{time.iso8601}
-X go.szostok.io/version.commit="brew"
-X go.szostok.io/version.commitDate=#{time.iso8601}
-X go.szostok.io/version.dirtyBuild=false
]
system "go", "build", *std_go_args(ldflags:)

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

test do
(testpath/"helmfile.yaml").write <<~YAML
repositories:
- name: stable
url: https://charts.helm.sh/stable

releases:
- name: vault # name of this release
namespace: vault # target namespace
createNamespace: true # helm 3.2+ automatically create release namespace (default true)
labels: # Arbitrary key value pairs for filtering releases
foo: bar
chart: stable/vault # the chart being installed to create this release, referenced by `repository/chart` syntax
version: ~1.24.1 # the semver of the chart. range constraint is supported
YAML
system Formula["helm"].opt_bin/"helm", "create", "foo"
output = "Adding repo stable https://charts.helm.sh/stable"
assert_match output, shell_output("#{bin}/helmfile -f helmfile.yaml repos 2>&1")
assert_match version.to_s, shell_output("#{bin}/helmfile -v")
end
end