Skip to content

Commit 9f08067

Browse files
committed
BUILD/MINOR: add go releaser for outside of cluster ingress controller
1 parent e55e004 commit 9f08067

File tree

3 files changed

+58
-0
lines changed

3 files changed

+58
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vscode/*
22
.idea/*
33
kubernetes-ingress
4+
dist/

.goreleaser.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Copyright 2019 HAProxy Technologies LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http:#www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
before:
15+
hooks:
16+
- go mod tidy
17+
builds:
18+
- env:
19+
- CGO_ENABLED=0
20+
binary: haproxy-ingress-controller
21+
id: my-build
22+
ldflags:
23+
- -X "main.GitRepo={{.GitURL}}"
24+
- -X "main.GitTag={{.Tag}}"
25+
- -X "main.GitCommit={{.ShortCommit}}"
26+
- -X "main.GitDirty= "
27+
- -X "main.BuildTime={{.Date}}"
28+
goos:
29+
- linux
30+
- darwin
31+
- freebsd
32+
goarch:
33+
- 386
34+
- amd64
35+
- arm
36+
- arm64
37+
- ppc64le
38+
- s390x
39+
archives:
40+
- name_template: "{{.Binary}}_{{.Version}}_{{.Os}}_{{.Arch}}"
41+
replacements:
42+
darwin: Darwin
43+
linux: Linux
44+
386: i386
45+
amd64: x86_64
46+
freebsd: FreeBSD
47+
checksum:
48+
name_template: 'checksums.txt'
49+
snapshot:
50+
name_template: "{{ .Tag }}-next"
51+
release:
52+
draft: true
53+
name_template: "HAProxy Ingress Controller v{{.Version}}"

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,7 @@ example-remove:
3333
.PHONY: build
3434
build:
3535
docker build -t haproxytech/kubernetes-ingress -f build/Dockerfile .
36+
37+
.PHONY: publish
38+
publish:
39+
goreleaser release --rm-dist

0 commit comments

Comments
 (0)