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
|
SWAG=go run github.com/swaggo/swag/cmd/swag@v1.8.11
|
||||||
GOTESTSUM=go run gotest.tools/gotestsum@latest
|
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
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
|
|
||||||
##@ Building
|
##@ Building
|
||||||
.PHONY: init-dist build-storybook build build-client build-server build-image devops
|
.PHONY: init-dist build-storybook build build-client build-server build-image devops
|
||||||
init-dist:
|
init-dist:
|
||||||
@mkdir -p dist
|
@mkdir -p dist
|
||||||
|
|
||||||
build-storybook:
|
|
||||||
yarn storybook:build
|
|
||||||
|
|
||||||
build: build-server build-client ## Build the server and client
|
build: build-server build-client ## Build the server and client
|
||||||
|
|
||||||
build-client: init-dist client-deps ## Build the 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-server: init-dist ## Build the server binary
|
||||||
./build/build_binary.sh "$(PLATFORM)" "$(ARCH)"
|
./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 .
|
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..."
|
echo "Building the devops binary..."
|
||||||
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
@./build/build_binary_azuredevops.sh "$(PLATFORM)" "$(ARCH)"
|
||||||
|
|
||||||
##@ Dependencies
|
build-storybook:
|
||||||
.PHONY: deps download-binaries client-deps tidy
|
yarn storybook:build
|
||||||
deps: download-binaries client-deps ## Download all build and client dependancies
|
|
||||||
|
|
||||||
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)
|
@./build/download_binaries.sh $(PLATFORM) $(ARCH)
|
||||||
|
|
||||||
client-deps: ## Install client dependencies
|
client-deps: ## Install client dependencies
|
||||||
|
@ -59,6 +59,7 @@ clean: ## Remove all build and download artifacts
|
||||||
@echo "Clearing the dist directory..."
|
@echo "Clearing the dist directory..."
|
||||||
@rm -rf dist/*
|
@rm -rf dist/*
|
||||||
|
|
||||||
|
|
||||||
##@ Testing
|
##@ Testing
|
||||||
.PHONY: test test-client test-server
|
.PHONY: test test-client test-server
|
||||||
test: test-server test-client ## Run all tests
|
test: test-server test-client ## Run all tests
|
||||||
|
@ -103,11 +104,13 @@ lint-client: ## Lint client code
|
||||||
lint-server: ## Lint server code
|
lint-server: ## Lint server code
|
||||||
cd api && go vet ./...
|
cd api && go vet ./...
|
||||||
|
|
||||||
|
|
||||||
##@ Extension
|
##@ Extension
|
||||||
.PHONY: dev-extension
|
.PHONY: dev-extension
|
||||||
dev-extension: build-server build-client ## Run the extension in development mode
|
dev-extension: build-server build-client ## Run the extension in development mode
|
||||||
make local -f build/docker-extension/Makefile
|
make local -f build/docker-extension/Makefile
|
||||||
|
|
||||||
|
|
||||||
##@ Docs
|
##@ Docs
|
||||||
.PHONY: docs-build docs-validate docs-clean docs-validate-clean
|
.PHONY: docs-build docs-validate docs-clean docs-validate-clean
|
||||||
docs-build: ## Build docs
|
docs-build: ## Build docs
|
||||||
|
@ -122,6 +125,7 @@ docs-clean: ## Clean docs
|
||||||
|
|
||||||
docs-validate-clean: docs-validate docs-clean ## Validate and clean docs
|
docs-validate-clean: docs-validate docs-clean ## Validate and clean docs
|
||||||
|
|
||||||
|
|
||||||
##@ Helpers
|
##@ Helpers
|
||||||
.PHONY: help
|
.PHONY: help
|
||||||
help: ## Display this help
|
help: ## Display this help
|
||||||
|
|
Loading…
Reference in New Issue