diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 1628ad8..36a5f77 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,7 +1,7 @@ project_name: hostmonitor before: hooks: - - make client + - make prepare-release - go mod tidy - go generate ./... builds: diff --git a/Makefile b/Makefile index 6ca03d3..bc12ff0 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,18 @@ -monitor: clean client +monitor: clean-build client go build -client: - rm -rf web/static && cd web/client && rm -rf dist && yarn && yarn build && cp -R ./dist ../static && cd ../.. -clean: + +prepare-release: clean client + +client: clean-client + cd web/client && yarn && yarn build && cp -R ./dist ../static && cd ../.. + +clean: clean-build clean-client + +clean-build: rm -f hostmonitor + rm -rf dist + +clean-client: + rm -rf web/static + rm -rf web/client/dist + rm -rf web/client/.parcel-cache