-
Notifications
You must be signed in to change notification settings - Fork 16
/
Makefile
33 lines (24 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
.DEFAULT_GOAL := help
.PHONY: run run-help test build package clean help
# Static files directory
STATIC_DIR = static
STATIC_DIST_DIR = $(STATIC_DIR)/dist
# Package files directory
PACKAGE_DIR = pkg
PACKAGE_BUILD_DIR = $(PACKAGE_DIR)/build
run: ## Runs the BBS node. To add arguments, do 'make run ARGS="--foo" run'.
go run cmd/bbsnode/bbsnode.go --http-gui-dir="./${STATIC_DIST_DIR}" ${ARGS}
run-help: ## Shows BBS node help.
@go run cmd/bbsnode/bbsnode.go --help
test: ## Run tests.
go test ./cmd/...
go test ./src/...
build: ## Build static files.
cd $(STATIC_DIR) && npm install -g @angular/cli@latest && yarn install && ng build --target=production
package: ## Builds static and binaries into zip files located in pkg/build directory.
cd $(PACKAGE_DIR) && bash package.sh
clean: ## Cleans static and built package files.
rm -rf $(STATIC_DIST_DIR)
rm -rf $(PACKAGE_BUILD_DIR)
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'