initial goreleaser build

This commit is contained in:
Annika Hannig 2022-11-10 10:42:42 +01:00
parent 15eb5cc295
commit e5aae9eaf8
4 changed files with 44 additions and 1 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@ var/
.DS_Store
*coverage*
dist/

37
.goreleaser.yaml Normal file
View File

@ -0,0 +1,37 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
- go mod tidy
- make -C ui/
builds:
- main: ./cmd/alice-lg
env:
- CGO_ENABLED=0
goos:
- linux
- freebsd
- netbsd
- openbsd
goarch:
- amd64
- arm64
ldflags:
- -X "github.com/alice-lg/alice-lg/pkg/config.Version={{ .Version }}"
archives:
- name_template: 'alice-lg_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
replacements:
386: i386
amd64: x86_64
checksum:
name_template: 'checksums.txt'
algorithm: sha256
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
skip: true
release:
extra_files:
- glob: ./CHANGELOG.md

View File

@ -26,13 +26,17 @@ backend:
$(MAKE) -C cmd/alice-lg/ static
backend_test:
mkdir -p ./ui/build
touch ./ui/build/UI_BUILD_STUB
go test ./pkg/...
rm ./ui/build/UI_BUILD_STUB
clean:
rm -f bin/alice-lg-linux-amd64
rm -f bin/alice-lg-osx-amd64
rm -rf $(DIST)
rm ./ui/build/UI_BUILD_STUB
.PHONY: backend ui clean

View File

@ -11,5 +11,5 @@ test:
yarn test --ci --all --watchAll=false
clean:
rm -f ./build
rm -rf ./build