Skip to content

Commit 37f972f

Browse files
fix(releaser): add main to goreleaser
Signed-off-by: Dusan Malusev <[email protected]>
1 parent ab3e873 commit 37f972f

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ cmd/gemini/dist/
44
.vscode
55
bin/
66
coverage.txt
7+
dist/

.goreleaser.yml

+9-5
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,35 @@ env:
55
before:
66
hooks:
77
- go mod download
8+
89
builds:
9-
-
10+
- id: gemini
11+
ldflags: -s -w
12+
main: ./cmd/gemini
1013
env:
1114
- CGO_ENABLED=0
1215
goos:
1316
- linux
1417
goarch:
1518
- amd64
19+
1620
archives:
1721
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
1822

1923
checksum:
2024
name_template: 'checksums.txt'
2125

2226
snapshot:
23-
name_template: "{{ .Tag }}-next"
27+
name_template: '{{ .Tag }}-next'
2428

2529
changelog:
2630
sort: asc
2731
filters:
2832
exclude:
29-
- '^docs:'
30-
- '^test:'
33+
- '^docs:'
34+
- '^test:'
3135

3236
dockers:
3337
- image_templates:
34-
- scylladb/gemini:{{ .Tag }}
38+
- scylladb/gemini:{{ .Version }}
3539
- scylladb/gemini:latest

Dockerfile

+2-13
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,8 @@
1-
FROM golang:1.23 AS builder
2-
3-
ENV GO111MODULE=on
4-
5-
WORKDIR /gemini
6-
7-
COPY . .
8-
9-
RUN apt-get update && apt-get install -y libc-dev build-essential \
10-
&& make build
11-
12-
FROM busybox AS production
1+
FROM busybox
132

143
WORKDIR /gemini
154

16-
COPY --from=builder /gemini/bin/gemini .
5+
COPY gemini .
176

187
ENV PATH="/gemini:${PATH}"
198

0 commit comments

Comments
 (0)