diff --git a/.gitignore b/.gitignore index a91ed3c..f64624b 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ var/ .DS_Store *coverage* + +dist/ diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..e086366 --- /dev/null +++ b/.goreleaser.yaml @@ -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 + diff --git a/Makefile b/Makefile index 0f61130..a02c3b5 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/ui/Makefile b/ui/Makefile index c183792..fd81d81 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -11,5 +11,5 @@ test: yarn test --ci --all --watchAll=false clean: - rm -f ./build + rm -rf ./build