From 1a4030d9c1a38a527f7102cebb9718e2139f61eb Mon Sep 17 00:00:00 2001 From: Denys Kashkovskyi Date: Sat, 16 Apr 2022 13:33:31 +0000 Subject: [PATCH] Prepare release scripts --- .goreleaser.yaml | 2 +- Makefile | 20 ++++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) 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