This commit is contained in:
hailin 2025-06-18 13:50:38 +08:00
parent 6eefab86da
commit 5084c90317
1 changed files with 8 additions and 8 deletions

View File

@ -5,30 +5,30 @@ BINS:=
DATE_TIME=`date +'%Y%m%d %H:%M:%S'` DATE_TIME=`date +'%Y%m%d %H:%M:%S'`
COMMIT_ID=`git rev-parse --short HEAD` COMMIT_ID=`git rev-parse --short HEAD`
MANAGER_DIR=${PWD} MANAGER_DIR=${PWD}
CONSOLE_CODE=/tmp/intent-system-frontend CONSOLE_CODE=/tmp/updsrv-frontend
build: build:
rm -f intent-system rm -f updsrv
go mod tidy && go build -ldflags "-s -w -X 'main.BuildTime=${DATE_TIME}' -X 'main.GitCommit=${COMMIT_ID}'" -o intent-system cmd/main.go go mod tidy && go build -ldflags "-s -w -X 'main.BuildTime=${DATE_TIME}' -X 'main.GitCommit=${COMMIT_ID}'" -o updsrv cmd/main.go
.PHONY: build .PHONY: build
BINS+=intent-system BINS+=updsrv
nodejs: nodejs:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - && sudo apt update && sudo apt install -y nodejs build-essential && sudo npm install -g yarn curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash - && sudo apt update && sudo apt install -y nodejs build-essential && sudo npm install -g yarn
.PHONY: nodejs .PHONY: nodejs
console: console:
rm -rf ${CONSOLE_CODE} && git clone -b master https://git.your-enterprise.com/intent-system-frontend.git ${CONSOLE_CODE} rm -rf ${CONSOLE_CODE} && git clone -b master https://git.jellydropsllc.com/updsrv-frontend.git ${CONSOLE_CODE}
cd ${CONSOLE_CODE} && git log -2 && npm install && npm run build:prod cd ${CONSOLE_CODE} && git log -2 && npm install && npm run build:prod
.PHONY: console .PHONY: console
docker-test: build docker-test: build
docker build --tag intent-system -f Dockerfile.test . docker build --tag updsrv -f Dockerfile.test .
.PHONY: docker-test .PHONY: docker-test
docker: docker:
rm -f intent-system rm -f updsrv
docker build --tag intent-system -f Dockerfile . docker build --tag updsrv -f Dockerfile .
.PHONY: docker .PHONY: docker
# 检查环境变量 # 检查环境变量