refactor: build docker image using build.sh (#1562)

This commit is contained in:
vvisionnn
2022-12-15 22:23:34 +08:00
committed by GitHub
parent 053e4352b4
commit 5f4f6bd91a
2 changed files with 38 additions and 31 deletions

View File

@@ -32,11 +32,15 @@ buildAssets() {
yarn run build
cd build
cd $REPO
# please keep in mind that if this final output binary `assets.zip` name changed, please go and update the `Dockerfile` as well
zip -r - assets/build >assets.zip
}
buildBinary() {
cd $REPO
# same as assets, if this final output binary `cloudreve` name changed, please go and update the `Dockerfile`
go build -a -o cloudreve -ldflags " -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.BackendVersion=$VERSION' -X 'github.com/cloudreve/Cloudreve/v3/pkg/conf.LastCommit=$COMMIT_SHA'"
}