mirror of https://github.com/bjdgyc/anylink.git
修改编译参数
This commit is contained in:
parent
04d025c68b
commit
2b9c0fdca8
|
@ -18,7 +18,7 @@ COPY --from=builder_node /web/ui /anylink/server/ui
|
||||||
#TODO 本地打包时使用镜像
|
#TODO 本地打包时使用镜像
|
||||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
||||||
RUN apk add --no-cache git gcc musl-dev
|
RUN apk add --no-cache git gcc musl-dev
|
||||||
RUN cd /anylink/server;go build -o anylink -ldflags "-X main.CommitId=$(git rev-parse HEAD)" \
|
RUN cd /anylink/server;go mod tidy;go build -o anylink -ldflags "-X main.CommitId=$(git rev-parse HEAD)" \
|
||||||
&& /anylink/server/anylink tool -v
|
&& /anylink/server/anylink tool -v
|
||||||
|
|
||||||
# anylink
|
# anylink
|
||||||
|
|
1
build.sh
1
build.sh
|
@ -31,6 +31,7 @@ rm -rf ui
|
||||||
cp -rf $cpath/web/ui .
|
cp -rf $cpath/web/ui .
|
||||||
#国内可替换源加快速度
|
#国内可替换源加快速度
|
||||||
export GOPROXY=https://goproxy.io
|
export GOPROXY=https://goproxy.io
|
||||||
|
go mod tidy
|
||||||
go build -v -o anylink -ldflags "-X main.CommitId=$(git rev-parse HEAD)"
|
go build -v -o anylink -ldflags "-X main.CommitId=$(git rev-parse HEAD)"
|
||||||
RETVAL $?
|
RETVAL $?
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue