Skip to content

Commit

Permalink
add commit id for anylink
Browse files Browse the repository at this point in the history
  • Loading branch information
stilleshan committed Aug 16, 2023
1 parent a403041 commit 8d6b436
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anylink/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ COPY --from=builder_node /web/ui /anylink/server/ui

#TODO 本地打包时使用镜像
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 cd /anylink/server;go mod tidy;go build -o anylink -ldflags "-X main.CommitId=$(git rev-parse HEAD)" \
RUN apk add --no-cache git gcc musl-dev curl
RUN cd /anylink/server;go mod tidy;go build -o anylink -ldflags "-X main.CommitId=$(curl -s "https://api.github.com/repos/bjdgyc/anylink/git/refs/tags/v${VERSION}" | grep sha | head -n 1 | cut -d '"' -f 4)" \
&& /anylink/server/anylink tool -v
# anylink
Expand Down

0 comments on commit 8d6b436

Please sign in to comment.