|
|
|
@@ -1,17 +1,13 @@
|
|
|
|
|
.PHONY: build-production
|
|
|
|
|
build-production: ## Build the production container image. Usage: make build-production TAG=15.4.0
|
|
|
|
|
@echo "Cloning repository..."
|
|
|
|
|
@rm -rf .tmp-brewman
|
|
|
|
|
@git clone --depth 1 $(if $(TAG),--branch v$(TAG)) git@git.tanshu.com:tanshu/brewman.git .tmp-brewman
|
|
|
|
|
|
|
|
|
|
@echo "Building image..."
|
|
|
|
|
@podman manifest rm registry.tanshu.com/brewman:latest 2>/dev/null || true
|
|
|
|
|
@podman build \
|
|
|
|
|
--platform linux/amd64,linux/arm64 \
|
|
|
|
|
--manifest registry.tanshu.com/brewman:latest \
|
|
|
|
|
--pull \
|
|
|
|
|
.tmp-brewman || (rm -rf .tmp-brewman && exit 1)
|
|
|
|
|
@rm -rf .tmp-brewman
|
|
|
|
|
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BREWMAN=$(TAG) \
|
|
|
|
|
git@git.tanshu.com:tanshu/brewman.git#v$(TAG)
|
|
|
|
|
|
|
|
|
|
@echo "Pushing manifests..."
|
|
|
|
|
@podman manifest push --all registry.tanshu.com/brewman:latest docker://registry.tanshu.com/brewman:latest
|
|
|
|
@@ -19,15 +15,11 @@ build-production: ## Build the production container image. Usage: make build-pro
|
|
|
|
|
|
|
|
|
|
.PHONY: build-check
|
|
|
|
|
build-check: ## Multi-arch build without push (compile check). Usage: make build-check TAG=15.4.0
|
|
|
|
|
@echo "Cloning repository..."
|
|
|
|
|
@rm -rf .tmp-brewman
|
|
|
|
|
@git clone --depth 1 $(if $(TAG),--branch v$(TAG)) git@git.tanshu.com:tanshu/brewman.git .tmp-brewman
|
|
|
|
|
|
|
|
|
|
@echo "Building image..."
|
|
|
|
|
@podman manifest rm brewman:test 2>/dev/null || true
|
|
|
|
|
@podman build \
|
|
|
|
|
--platform linux/amd64,linux/arm64 \
|
|
|
|
|
--manifest brewman:test \
|
|
|
|
|
--pull \
|
|
|
|
|
.tmp-brewman || (rm -rf .tmp-brewman && exit 1)
|
|
|
|
|
@rm -rf .tmp-brewman
|
|
|
|
|
--build-arg SETUPTOOLS_SCM_PRETEND_VERSION_FOR_BREWMAN=$(TAG) \
|
|
|
|
|
git@git.tanshu.com:tanshu/brewman.git#v$(TAG)
|
|
|
|
|