Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cleanup before make generate step #386

Merged
merged 1 commit into from Mar 5, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions Makefile
@@ -1,4 +1,4 @@
.PHONY: build
.PHONY: build clean clean-assets

export GO111MODULE=on

Expand Down Expand Up @@ -66,7 +66,9 @@ define HELP_TEXT
make generate-go - Generate and bundle required go code
make generate-js - Generate and bundle required js code
make generate-dev - Generate and bundle required code in a watch loop
make distclean - Delete all build artifacts

make clean - Clean all build artifacts
make clean-assets - Clean assets only

make build - Build the code
make package - Build rpm and deb packages for linux
Expand Down Expand Up @@ -137,9 +139,9 @@ test-js:

test: lint test-go test-js

generate: generate-js generate-go
generate: clean-assets generate-js generate-go

generate-js: .prefix
generate-js: clean-assets .prefix
NODE_ENV=production webpack --progress --colors

generate-go: .prefix
Expand Down Expand Up @@ -171,7 +173,7 @@ deps-go:
migration:
go run github.com/fleetdm/goose/cmd/goose -dir server/datastore/mysql/migrations/tables create $(name)

distclean:
clean: clean-assets
ifeq ($(OS), Windows_NT)
if exist build rmdir /s/q build
if exist vendor rmdir /s/q vendor
Expand All @@ -181,6 +183,9 @@ else
rm -f assets/bundle.js
endif

clean-assets:
git clean -fx assets

docker-build-release: xp-fleet xp-fleetctl
docker build -t "${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" .
docker tag "${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG}" fleetdm/fleet:${VERSION}
Expand Down