Skip to content

Commit dd92be8

Browse files
committed
kbld 0.45.0 (new formula)
Signed-off-by: Rui Chen <[email protected]>
1 parent c7c3e8c commit dd92be8

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

.github/autobump.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,6 +1649,7 @@ kapp
16491649
karmadactl
16501650
kaskade
16511651
katana
1652+
kbld
16521653
kcat
16531654
kcgi
16541655
kcov

Formula/k/kbld.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
class Kbld < Formula
2+
desc "Tool for building and pushing container images in development workflows"
3+
homepage "https://carvel.dev/kbld/"
4+
url "https://github.com/carvel-dev/kbld/archive/refs/tags/v0.45.0.tar.gz"
5+
sha256 "06ec0c144ea24f462fad87bd57463e28cf853d6f58a47a434e79a2deb49d23cd"
6+
license "Apache-2.0"
7+
head "https://github.com/carvel-dev/kbld.git", branch: "develop"
8+
9+
depends_on "go" => :build
10+
11+
def install
12+
ldflags = %W[
13+
-s -w
14+
-X carvel.dev/kbld/pkg/kbld/version.Version=#{version}
15+
]
16+
system "go", "build", *std_go_args(ldflags:), "./cmd/kbld"
17+
end
18+
19+
test do
20+
assert_match version.to_s, shell_output("#{bin}/kbld --version")
21+
22+
test_yaml = testpath/"test.yml"
23+
test_yaml.write <<~YAML
24+
---
25+
apiVersion: v1
26+
kind: Pod
27+
metadata:
28+
name: test
29+
spec:
30+
containers:
31+
- name: test
32+
image: nginx:1.14.2
33+
YAML
34+
35+
output = shell_output("#{bin}/kbld -f #{test_yaml}")
36+
assert_match "image: index.docker.io/library/nginx@sha256", output
37+
end
38+
end

0 commit comments

Comments
 (0)