Skip to content

Commit

Permalink
fix(releaser): add main to goreleaser
Browse files Browse the repository at this point in the history
Signed-off-by: Dusan Malusev <[email protected]>
  • Loading branch information
CodeLieutenant committed Sep 30, 2024
1 parent ab3e873 commit 37f972f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ cmd/gemini/dist/
.vscode
bin/
coverage.txt
dist/
14 changes: 9 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,35 @@ env:
before:
hooks:
- go mod download

builds:
-
- id: gemini
ldflags: -s -w
main: ./cmd/gemini
env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- amd64

archives:
- name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'

checksum:
name_template: 'checksums.txt'

snapshot:
name_template: "{{ .Tag }}-next"
name_template: '{{ .Tag }}-next'

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- '^docs:'
- '^test:'

dockers:
- image_templates:
- scylladb/gemini:{{ .Tag }}
- scylladb/gemini:{{ .Version }}
- scylladb/gemini:latest
15 changes: 2 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
FROM golang:1.23 AS builder

ENV GO111MODULE=on

WORKDIR /gemini

COPY . .

RUN apt-get update && apt-get install -y libc-dev build-essential \
&& make build

FROM busybox AS production
FROM busybox

WORKDIR /gemini

COPY --from=builder /gemini/bin/gemini .
COPY gemini .

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

Expand Down

0 comments on commit 37f972f

Please sign in to comment.