From 5153f023a755ffe2f2dac8ceefbc89d1826878ae Mon Sep 17 00:00:00 2001 From: yaiba <4yaiba@gmail.com> Date: Fri, 12 May 2023 10:47:22 -0500 Subject: [PATCH] chore: update tools --- .goreleaser.yaml | 15 ++++++++++++--- makefile | 6 +++--- wasm/.gitignore | 1 + 3 files changed, 16 insertions(+), 6 deletions(-) create mode 100644 wasm/.gitignore diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1720a4e..545d68b 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -2,10 +2,11 @@ # Make sure to check the documentation at https://goreleaser.com before: hooks: - # You may remove this if you don't use go modules. + - rm -rf ./dist + - rm -f ./wasm/*.wasm - go mod tidy - # you may remove this if you don't need go generate - - go generate ./... + - go generate ./wasm/wasm.go + builds: - env: - CGO_ENABLED=0 @@ -13,6 +14,9 @@ builds: - linux - windows - darwin + goarch: + - amd64 + - arm64 ldflags: - -s -w - -X github.com/kwilteam/kuneiform/version.Version={{.Version}} @@ -20,6 +24,11 @@ builds: - -X github.com/kwilteam/kuneiform/version.Date={{.Date}} - -X github.com/kwilteam/kuneiform/version.BuiltBy=goreleaser +# pro feature +#include: +# - from_file: +# path: ./wasm/kuneiform.wasm + archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of uname. diff --git a/makefile b/makefile index 3743854..f4e371d 100644 --- a/makefile +++ b/makefile @@ -1,16 +1,16 @@ .DEFAULT_GOAL := help -.PHONY: help, download, wasm, build +.PHONY: help download wasm build help: - # 20s is the width of the first column + @# 20s is the width of the first column @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' download: ## download dependencies @echo Download go.mod dependencies @go mod download -build: +build: ## build from current commit @echo Build parser @goreleaser build --snapshot --clean diff --git a/wasm/.gitignore b/wasm/.gitignore new file mode 100644 index 0000000..917660a --- /dev/null +++ b/wasm/.gitignore @@ -0,0 +1 @@ +*.wasm \ No newline at end of file