Some checks reported errors
continuous-integration/drone/push Build was killed
29 lines
1.2 KiB
Makefile
29 lines
1.2 KiB
Makefile
.PHONY: help
|
|
help: ## Lists all commands available
|
|
# Snippet comes from: https://gist.github.com/prwhite/8168133#gistcomment-3785627
|
|
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
|
|
|
|
.PHONY: build
|
|
build: ## Build the main covergen CLI for the local platform
|
|
go build -o covergen ./cmd/covergen
|
|
|
|
.PHONY: wasm
|
|
wasm: ## Generate the main WASM blob
|
|
GOOS=js GOARCH=wasm go build -o covergen.wasm ./cmd/wasm/main.go
|
|
|
|
.PHONY: build-cross-clis
|
|
build-cross-clis: ## Builds the CLIs for all supported platforms
|
|
rm -rf ./dist && mkdir ./dist
|
|
GOOS=linux GOARCH=amd64 go build -o dist/covergen.linux-amd64 ./cmd/covergen
|
|
GOOS=darwin GOARCH=amd64 go build -o dist/covergen.darwin-amd64 ./cmd/covergen
|
|
|
|
.PHONY: wasm-frontend
|
|
wasm-frontend: wasm
|
|
cp covergen.wasm frontend/public/covergen.wasm
|
|
|
|
.PHONY: clis-frontend
|
|
clis-frontend: build-cross-clis
|
|
cp -r dist/ frontend/public/
|
|
|
|
.PHONY: prepare-frontend
|
|
prepare-frontend: wasm-frontend clis-frontend ### Prepares all main-repo requirements for the frontend
|