Skip to content

Commit c054c08

Browse files
committed
configure goreleaser
1 parent 6c8ca42 commit c054c08

File tree

5 files changed

+172
-26
lines changed

5 files changed

+172
-26
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
dist/

.goreleaser.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
2+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
3+
4+
version: 1
5+
6+
project_name: apoxy
7+
8+
release:
9+
github:
10+
owner: apoxy-dev
11+
name: apoxy-cli
12+
draft: true
13+
replace_existing_draft: true
14+
15+
before:
16+
hooks:
17+
# You may remove this if you don't use go modules.
18+
- go mod tidy
19+
# you may remove this if you don't need go generate
20+
- go generate ./...
21+
22+
builds:
23+
- env:
24+
- CGO_ENABLED=0
25+
ldflags:
26+
- -X github.com/apoxy-dev/apoxy-cli/build.BuildVersion={{.Version}}
27+
- -X github.com/apoxy-dev/apoxy-cli/build.BuildDate={{.Date}}
28+
- -X github.com/apoxy-dev/apoxy-cli/build.CommitHash={{.ShortCommit}}
29+
goos:
30+
- linux
31+
- windows
32+
- darwin
33+
34+
archives:
35+
- format: tar.gz
36+
# this name template makes the OS and Arch compatible with the results of `uname`.
37+
name_template: >-
38+
{{ .ProjectName }}_
39+
{{- title .Os }}_
40+
{{- if eq .Arch "amd64" }}x86_64
41+
{{- else if eq .Arch "386" }}i386
42+
{{- else }}{{ .Arch }}{{ end }}
43+
{{- if .Arm }}v{{ .Arm }}{{ end }}
44+
# use zip for windows archives
45+
format_overrides:
46+
- goos: windows
47+
format: zip
48+
49+
changelog:
50+
sort: asc
51+
filters:
52+
exclude:
53+
- "^docs:"
54+
- "^test:"

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#/bin/bash
1+
#!/bin/bash
22

33
PACKAGE="github.com/apoxy-dev/apoxy-cli"
44
VERSION="$(git describe --tags --always --abbrev=0 --match='v[0-9]*.[0-9]*.[0-9]*' 2> /dev/null | sed 's/^.//')"

go.mod

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,35 @@ module github.com/apoxy-dev/apoxy-cli
33
go 1.21.3
44

55
require (
6+
github.com/jedib0t/go-pretty/v6 v6.4.9
67
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8
78
github.com/spf13/cobra v1.8.0
89
golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
910
gopkg.in/yaml.v3 v3.0.1
11+
k8s.io/api v0.28.4
12+
k8s.io/apimachinery v0.28.4
13+
k8s.io/apiserver v0.28.4
1014
k8s.io/client-go v0.28.4
15+
sigs.k8s.io/apiserver-runtime v1.1.1
16+
sigs.k8s.io/controller-runtime v0.16.3
1117
)
1218

1319
require (
1420
github.com/beorn7/perks v1.0.1 // indirect
1521
github.com/blang/semver/v4 v4.0.0 // indirect
1622
github.com/cespare/xxhash/v2 v2.2.0 // indirect
1723
github.com/davecgh/go-spew v1.1.1 // indirect
18-
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
1924
github.com/go-logr/logr v1.2.4 // indirect
20-
github.com/go-openapi/jsonpointer v0.19.6 // indirect
21-
github.com/go-openapi/jsonreference v0.20.2 // indirect
22-
github.com/go-openapi/swag v0.22.3 // indirect
2325
github.com/gogo/protobuf v1.3.2 // indirect
2426
github.com/golang/protobuf v1.5.3 // indirect
25-
github.com/google/gnostic-models v0.6.8 // indirect
26-
github.com/google/go-cmp v0.5.9 // indirect
2727
github.com/google/gofuzz v1.2.0 // indirect
2828
github.com/google/uuid v1.3.0 // indirect
2929
github.com/inconshreveable/mousetrap v1.1.0 // indirect
30-
github.com/jedib0t/go-pretty/v6 v6.4.9 // indirect
31-
github.com/josharian/intern v1.0.0 // indirect
3230
github.com/json-iterator/go v1.1.12 // indirect
33-
github.com/mailru/easyjson v0.7.7 // indirect
3431
github.com/mattn/go-runewidth v0.0.15 // indirect
3532
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
3633
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
3734
github.com/modern-go/reflect2 v1.0.2 // indirect
38-
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
3935
github.com/prometheus/client_golang v1.16.0 // indirect
4036
github.com/prometheus/client_model v0.4.0 // indirect
4137
github.com/prometheus/common v0.44.0 // indirect
@@ -52,15 +48,9 @@ require (
5248
google.golang.org/protobuf v1.31.0 // indirect
5349
gopkg.in/inf.v0 v0.9.1 // indirect
5450
gopkg.in/yaml.v2 v2.4.0 // indirect
55-
k8s.io/api v0.28.4 // indirect
56-
k8s.io/apimachinery v0.28.4 // indirect
57-
k8s.io/apiserver v0.28.4 // indirect
5851
k8s.io/component-base v0.28.4 // indirect
5952
k8s.io/klog/v2 v2.100.1 // indirect
60-
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
6153
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
62-
sigs.k8s.io/apiserver-runtime v1.1.1 // indirect
63-
sigs.k8s.io/controller-runtime v0.16.3 // indirect
6454
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
6555
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
6656
sigs.k8s.io/yaml v1.3.0 // indirect

0 commit comments

Comments
 (0)