forked from LambdaTest/drone-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.goreleaser-local.yml
53 lines (50 loc) · 1.5 KB
/
.goreleaser-local.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
project_name: drone-cache
before:
hooks:
- make clean
- make vendor
dist: target/dist
builds:
-
goos:
- linux
goarch:
- amd64
env:
- CGO_ENABLED=0
flags:
-tags netgo
ldflags: >
-s
-w
-X main.Version={{.Version}}
-X main.Commit={{.ShortCommit}}
-X main.Date={{.Date}}
hooks:
# Ignores failures, this is just best effort. Alternative: find target/dist -name drone-cache -type f -exec upx {} +
post: find target/dist -name drone-cache -type f -print0 | xargs -n 1 -0 upx
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" # default
snapshot:
name_template: "{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}" # default
dockers:
-
goos: linux
goarch: amd64
goarm: ''
# Modify the image template name here as desired
image_templates:
- "drone-cache:MyTestTag"
dockerfile: Dockerfile
build_flag_templates:
- "--label=org.label-schema.schema-version=1.0"
- "--label=version={{.Version}}"
- "--label=org.label-schema.name={{.ProjectName}}"
- "--label=org.label-schema.version={{.Version}}"
- "--label=org.label-schema.build-date={{.Date}}"
- "--label=org.label-schema.vcs-ref={{.FullCommit}}"
- "--label=org.label-schema.docker.dockerfile=Dockerfile"
- "--label=org.opencontainers.image.name={{.ProjectName}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"