feat: update make file

This commit is contained in:
2024-09-03 00:39:48 +08:00
parent 96316f95b9
commit 9af7e325fa
2 changed files with 10 additions and 2 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ _old
rice-box.go
.idea/
/filebrowser
/filebrowser-*
/filebrowser.exe
/dist

View File

@@ -16,6 +16,13 @@ build-frontend: ## Build frontend
build-backend: ## Build backend
$Q $(go) build -ldflags '$(LDFLAGS)' -o .
.PHONY: build-cross-backends
build-cross-backends: ## Build cross backends
$Q GOOS=linux GOARCH=arm64 $(go) build -ldflags '$(LDFLAGS)' -o filebrowser-linux-arm64
$Q GOOS=linux GOARCH=amd64 $(go) build -ldflags '$(LDFLAGS)' -o filebrowser-linux-amd64
$Q GOOS=darwin GOARCH=arm64 $(go) build -ldflags '$(LDFLAGS)' -o filebrowser-darwin-arm64
$Q GOOS=darwin GOARCH=amd64 $(go) build -ldflags '$(LDFLAGS)' -o filebrowser-darwin-amd64
.PHONY: test
test: | test-frontend test-backend ## Run all tests
@@ -63,6 +70,6 @@ help: ## Show this help
@echo ''
@echo 'Targets:'
@awk 'BEGIN {FS = ":.*?## "} { \
if (/^[a-zA-Z_-]+:.*?##.*$$/) {printf " ${YELLOW}%-20s${GREEN}%s${RESET}\n", $$1, $$2} \
if (/^[a-zA-Z_-]+:.*?##.*$$/) {printf " ${YELLOW}%-24s${GREEN}%s${RESET}\n", $$1, $$2} \
else if (/^## .*$$/) {printf " ${CYAN}%s${RESET}\n", substr($$1,4)} \
}' $(MAKEFILE_LIST)