mirror of https://github.com/portainer/portainer
sync makefile with ee (#8918)
parent
c86b76261a
commit
d8fcce4c31
26
Makefile
26
Makefile
|
@ -12,18 +12,15 @@ TAG=latest
|
|||
SWAG=go run github.com/swaggo/swag/cmd/swag@v1.8.11
|
||||
GOTESTSUM=go run gotest.tools/gotestsum@latest
|
||||
|
||||
# Don't change anything below unless you know what you're doing
|
||||
|
||||
# Don't change anything below this line unless you know what you're doing
|
||||
.DEFAULT_GOAL := help
|
||||
|
||||
|
||||
##@ Building
|
||||
.PHONY: init-dist build-storybook build build-client build-server build-image devops
|
||||
init-dist:
|
||||
@mkdir -p dist
|
||||
|
||||
build-storybook:
|
||||
yarn storybook:build
|
||||
|
||||
build: build-server build-client ## Build the server and client
|
||||
|
||||
build-client: init-dist client-deps ## Build the client
|
||||
|
@ -32,18 +29,21 @@ build-client: init-dist client-deps ## Build the client
|
|||
build-server: init-dist ## Build the server binary
|
||||
./build/build_binary.sh "$(PLATFORM)" "$(ARCH)"
|
||||
|
||||
build-image: deps build ## Build the Portainer image locally
|
||||
build-image: build ## Build the Portainer image locally
|
||||
docker buildx build --load -t portainerci/portainer:$(TAG) -f build/linux/Dockerfile .
|
||||
|
||||
devops: clean init-dist download-binaries build-client ## Build the server binary for CI
|
||||
devops: clean init-dist server-deps build-client ## Build the server binary for CI
|
||||
echo "Building the devops binary..."
|
||||
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
||||
|
||||
##@ Dependencies
|
||||
.PHONY: deps download-binaries client-deps tidy
|
||||
deps: download-binaries client-deps ## Download all build and client dependancies
|
||||
build-storybook:
|
||||
yarn storybook:build
|
||||
|
||||
download-binaries: ## Download dependant binaries
|
||||
##@ Build dependencies
|
||||
.PHONY: deps server-deps client-deps tidy
|
||||
deps-all: server-deps client-deps ## Download all client and server build dependancies
|
||||
|
||||
server-deps: ## Download dependant server binaries
|
||||
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
|
||||
|
||||
client-deps: ## Install client dependencies
|
||||
|
@ -59,6 +59,7 @@ clean: ## Remove all build and download artifacts
|
|||
@echo "Clearing the dist directory..."
|
||||
@rm -rf dist/*
|
||||
|
||||
|
||||
##@ Testing
|
||||
.PHONY: test test-client test-server
|
||||
test: test-server test-client ## Run all tests
|
||||
|
@ -103,11 +104,13 @@ lint-client: ## Lint client code
|
|||
lint-server: ## Lint server code
|
||||
cd api && go vet ./...
|
||||
|
||||
|
||||
##@ Extension
|
||||
.PHONY: dev-extension
|
||||
dev-extension: build-server build-client ## Run the extension in development mode
|
||||
make local -f build/docker-extension/Makefile
|
||||
|
||||
|
||||
##@ Docs
|
||||
.PHONY: docs-build docs-validate docs-clean docs-validate-clean
|
||||
docs-build: ## Build docs
|
||||
|
@ -122,6 +125,7 @@ docs-clean: ## Clean docs
|
|||
|
||||
docs-validate-clean: docs-validate docs-clean ## Validate and clean docs
|
||||
|
||||
|
||||
##@ Helpers
|
||||
.PHONY: help
|
||||
help: ## Display this help
|
||||
|
|
Loading…
Reference in New Issue