1 Star 0 Fork 18

韩云峰/zadig-portal

forked from KodeRover/zadig-portal 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.77 KB
一键复制 编辑 原始数据 按行查看 历史
leozhang2018 提交于 2023-08-01 17:32 . feat:add version checker.
# New Makefile for multi-architecture
# WARNING:
# This makefile used docker buildx to build multi-arch image
# Please make sure you have the right version of docker.
.PHONY: all
## This Makefile should be used with zadig workflow to inject multiple build parameters.
IMAGE_REPOSITORY = koderover.tencentcloudcr.com/koderover-public
VERSION ?= $(shell date +'%Y%m%d%H%M%S')
VERSION := $(VERSION)
BUILD_TIME ?= $(shell date +%s)
BUILD_TIME := $(BUILD_TIME)
IMAGE ?= ${IMAGE_REPOSITORY}/zadig-portal:${VERSION}
prereq:
@docker buildx create --node=multiarch-frontend --use --platform=linux/amd64,linux/arm64
@sed -i 's/$${VERSION}/${VERSION}/g' config/prod.env.js
@sed -i 's/$${BUILD_TIME}/${BUILD_TIME}/g' config/prod.env.js
@sed -i 's/$${COMMIT_ID}/${zadig_portal_COMMIT_ID}/g' config/prod.env.js
@sed -i 's/$${BRANCH}/${zadig_portal_BRANCH}/g' config/prod.env.js
@sed -i 's/$${PR}/${zadig_portal_PR}/g' config/prod.env.js
@sed -i 's/$${TAG}/${zadig_portal_TAG}/g' config/prod.env.js
@sed -i 's/$${VERSION}/${VERSION}/g' static/version.json
@sed -i 's/$${BUILD_TIME}/${BUILD_TIME}/g' static/version.json
@sed -i 's/$${COMMIT_ID}/${zadig_portal_COMMIT_ID}/g' static/version.json
@sed -i 's/$${BRANCH}/${zadig_portal_BRANCH}/g' static/version.json
@sed -i 's/$${PR}/${zadig_portal_PR}/g' static/version.json
@sed -i 's/$${TAG}/${zadig_portal_TAG}/g' static/version.json
@cat config/prod.env.js
@cat static/version.json
all: prereq
all:
@yarn install
@yarn run build
@docker buildx build -t ${IMAGE} --platform linux/amd64,linux/arm64 -f Dockerfile --build-arg BRANCH=${zadig_portal_BRANCH} --build-arg PR=${zadig_portal_PR} --build-arg TAG=${zadig_portal_TAG} --build-arg COMMIT_ID=${zadig_portal_COMMIT_ID} --build-arg BUILD_TIME=${BUILD_TIME} --build-arg BUILD_URL=${BUILD_URL} --push .
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hanyunfeng6163/zadig-portal.git
git@gitee.com:hanyunfeng6163/zadig-portal.git
hanyunfeng6163
zadig-portal
zadig-portal
main

搜索帮助