This commit is contained in:
parent
6eefab86da
commit
5084c90317
16
Makefile
16
Makefile
|
|
@ -5,30 +5,30 @@ BINS:=
|
|||
DATE_TIME=`date +'%Y%m%d %H:%M:%S'`
|
||||
COMMIT_ID=`git rev-parse --short HEAD`
|
||||
MANAGER_DIR=${PWD}
|
||||
CONSOLE_CODE=/tmp/intent-system-frontend
|
||||
CONSOLE_CODE=/tmp/updsrv-frontend
|
||||
|
||||
build:
|
||||
rm -f intent-system
|
||||
go mod tidy && go build -ldflags "-s -w -X 'main.BuildTime=${DATE_TIME}' -X 'main.GitCommit=${COMMIT_ID}'" -o intent-system cmd/main.go
|
||||
rm -f updsrv
|
||||
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
|
||||
BINS+=intent-system
|
||||
BINS+=updsrv
|
||||
|
||||
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
|
||||
.PHONY: nodejs
|
||||
|
||||
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
|
||||
.PHONY: console
|
||||
|
||||
docker-test: build
|
||||
docker build --tag intent-system -f Dockerfile.test .
|
||||
docker build --tag updsrv -f Dockerfile.test .
|
||||
.PHONY: docker-test
|
||||
|
||||
docker:
|
||||
rm -f intent-system
|
||||
docker build --tag intent-system -f Dockerfile .
|
||||
rm -f updsrv
|
||||
docker build --tag updsrv -f Dockerfile .
|
||||
.PHONY: docker
|
||||
|
||||
# 检查环境变量
|
||||
|
|
|
|||
Loading…
Reference in New Issue