Skip to content

Commit

Permalink
Refine scripts build with version (#392)
Browse files Browse the repository at this point in the history
Signed-off-by: wayblink <[email protected]>
  • Loading branch information
wayblink authored Aug 13, 2024
1 parent b049ab1 commit 1e1fc88
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 71 deletions.
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go get
./gen_swag.sh
./gen_proto.sh
go build
./scripts/gen_swag.sh
./scripts/gen_proto.sh
go build -ldflags "-X main.commit=$(git rev-parse --short HEAD) -X main.date=$(date -u '+%Y-%m-%dT%H:%M:%SZ')" -o milvus-backup
2 changes: 1 addition & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

VERSION=$(git describe --tags --always)
COMMIT=$(git rev-parse --short HEAD)
DATA=$(date +'%Y-%m-%dT%H:%M:%S')
DATA=$(date +'%Y-%m-%dT%H:%M:%SZ')

docker build -t milvusdb/milvus-backup:$VERSION --build-arg VERSION=$VERSION --build-arg COMMIT=$COMMIT --build-arg DATA=$DATA .
docker tag milvusdb/milvus-backup:$VERSION milvusdb/milvus-backup:latest
5 changes: 0 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ require (
github.com/swaggo/swag v1.16.1
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.865
github.com/uber/jaeger-client-go v2.25.0+incompatible
go.etcd.io/etcd/client/v3 v3.5.0
go.uber.org/atomic v1.10.0
go.uber.org/zap v1.17.0
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602
Expand All @@ -52,8 +51,6 @@ require (
github.com/alibabacloud-go/tea v1.1.8 // indirect
github.com/cockroachdb/logtags v0.0.0-20211118104740-dabe8e521a4f // indirect
github.com/cockroachdb/redact v1.1.3 // indirect
github.com/coreos/go-semver v0.3.0 // indirect
github.com/coreos/go-systemd/v22 v22.3.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
Expand Down Expand Up @@ -102,8 +99,6 @@ require (
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.0 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/exp v0.0.0-20220303212507-bbda1eaf7a17 // indirect
Expand Down
Loading

0 comments on commit 1e1fc88

Please sign in to comment.