mirror of
https://github.com/bjdgyc/anylink.git
synced 2025-08-08 11:44:11 +08:00
优化Dockerfile使用
This commit is contained in:
13
build.sh
13
build.sh
@@ -1,4 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/env bash
|
||||
|
||||
set -x
|
||||
function RETVAL(){
|
||||
rt=$1
|
||||
if [ $rt != 0 ]; then
|
||||
echo $rt
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
#当前目录
|
||||
cpath=$(pwd)
|
||||
@@ -6,6 +15,7 @@ cpath=$(pwd)
|
||||
echo "编译二进制文件"
|
||||
cd $cpath/server
|
||||
go build -o anylink -ldflags "-X main.COMMIT_ID=$(git rev-parse HEAD)"
|
||||
RETVAL $?
|
||||
|
||||
echo "编译前端项目"
|
||||
cd $cpath/web
|
||||
@@ -14,6 +24,7 @@ npm install --registry=https://registry.npm.taobao.org
|
||||
npm run build --registry=https://registry.npm.taobao.org
|
||||
#npm install
|
||||
#npm run build
|
||||
RETVAL $?
|
||||
|
||||
cd $cpath
|
||||
|
||||
|
Reference in New Issue
Block a user