mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Comply with Golang semantic import versioning (#630)
* Code: compatible with semantic import versioning * Tools & Docs: compatible with semantic import versioning * Clean go.mod & go.sum
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -15,10 +15,10 @@ FROM golang:1.15.1-alpine3.12 AS be-builder
|
||||
|
||||
ENV GO111MODULE on
|
||||
|
||||
COPY . /go/src/github.com/HFO4/cloudreve
|
||||
COPY --from=fe-builder /assets/build/ /go/src/github.com/HFO4/cloudreve/assets/build/
|
||||
COPY . /go/src/github.com/cloudreve/Cloudreve/v3
|
||||
COPY --from=fe-builder /assets/build/ /go/src/github.com/cloudreve/Cloudreve/v3/assets/build/
|
||||
|
||||
WORKDIR /go/src/github.com/HFO4/cloudreve
|
||||
WORKDIR /go/src/github.com/cloudreve/Cloudreve/v3
|
||||
|
||||
RUN set -ex \
|
||||
&& apk upgrade \
|
||||
@@ -27,8 +27,8 @@ RUN set -ex \
|
||||
&& export VERSION=$(git describe --tags) \
|
||||
&& (cd && go get github.com/rakyll/statik) \
|
||||
&& statik -src=assets/build/ -include=*.html,*.js,*.json,*.css,*.png,*.svg,*.ico -f \
|
||||
&& go install -ldflags "-X 'github.com/HFO4/cloudreve/pkg/conf.BackendVersion=${VERSION}' \
|
||||
-X 'github.com/HFO4/cloudreve/pkg/conf.LastCommit=${COMMIT_SHA}'\
|
||||
&& go install -ldflags "-X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=${VERSION}' \
|
||||
-X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=${COMMIT_SHA}'\
|
||||
-w -s"
|
||||
|
||||
# build final image
|
||||
|
||||
Reference in New Issue
Block a user