Commit df1592ff authored by nanahira's avatar nanahira

add versions

parent 82f1e1bd
Pipeline #605 passed with stages
in 5 minutes and 27 seconds
...@@ -9,3 +9,4 @@ logs/ ...@@ -9,3 +9,4 @@ logs/
device.json device.json
data/ data/
vendor/ vendor/
/go-cqhttp
...@@ -4,3 +4,4 @@ logs/ ...@@ -4,3 +4,4 @@ logs/
device.json device.json
data/ data/
vendor/ vendor/
/go-cqhttp
...@@ -6,6 +6,7 @@ variables: ...@@ -6,6 +6,7 @@ variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
GO_CQHTTP_VERSION: v0.9.20-mycard
binary: binary:
stage: build stage: build
...@@ -15,7 +16,7 @@ binary: ...@@ -15,7 +16,7 @@ binary:
script: script:
- go env -w GO111MODULE=auto && go env -w CGO_ENABLED=0 && go env -w GOPROXY=https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct - go env -w GO111MODULE=auto && go env -w CGO_ENABLED=0 && go env -w GOPROXY=https://goproxy.cn,https://gocenter.io,https://goproxy.io,direct
- mkdir dist - mkdir dist
- go build -ldflags "-s -w -extldflags '-static'" -o dist/cqhttp - go build -ldflags "-s -w -extldflags '-static' -X 'github.com/Mrs4s/go-cqhttp/coolq.version=$GO_CQHTTP_VERSION'" -o dist/cqhttp
artifacts: artifacts:
paths: paths:
- dist/ - dist/
......
FROM golang:1.14.2-alpine AS builder FROM golang:1.14.2-alpine AS builder
ARG GO_CQHTTP_VERSION
ENV GO_CQHTTP_VERSION ${GO_CQHTTP_VERSION:-v0.9.20-mycard}
RUN go env -w GO111MODULE=auto \ RUN go env -w GO111MODULE=auto \
&& go env -w CGO_ENABLED=0 \ && go env -w CGO_ENABLED=0 \
...@@ -10,7 +12,7 @@ WORKDIR /build ...@@ -10,7 +12,7 @@ WORKDIR /build
COPY ./ . COPY ./ .
RUN cd /build \ RUN cd /build \
&& go build -ldflags "-s -w -extldflags '-static'" -o cqhttp && go build -ldflags "-s -w -extldflags '-static' -X 'github.com/Mrs4s/go-cqhttp/coolq.version=$GO_CQHTTP_VERSION'" -o cqhttp
FROM alpine:latest FROM alpine:latest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment