File tree Expand file tree Collapse file tree 6 files changed +25
-12
lines changed
Expand file tree Collapse file tree 6 files changed +25
-12
lines changed Original file line number Diff line number Diff line change 22
33MAKEFLAGS += --warn-undefined-variables
44
5- # Runtime/Dev variables (used in src/backend/conf/app.conf)
6- -include .env
7- export
8-
95# Build variables
6+ REGISTRY_URI :=360cloud
107RELEASE_VERSION :=$(shell git describe --always --tags)
118UI_BUILD_VERSION :=v1.0.0
129SERVER_BUILD_VERSION :=v1.0.0
1310
1411
15- release : build-release-image push-image
12+ release : update-version build-release-image push-image
1613
14+ update-version :
15+ ./hack/updateversion.sh
1716
1817# run module
1918run-backend :
@@ -45,18 +44,18 @@ swagger-openapi:
4544# release, requiring Docker 17.05 or higher on the daemon and client
4645build-release-image :
4746 @echo " version: $( RELEASE_VERSION) "
48- docker build --no-cache --build-arg RAVEN_DSN=$(RAVEN_DSN ) -t 360cloud /wayne:$(RELEASE_VERSION ) .
47+ docker build --no-cache --build-arg RAVEN_DSN=$(RAVEN_DSN ) -t $( REGISTRY_URI ) /wayne:$(RELEASE_VERSION ) .
4948
5049push-image :
51- docker push 360cloud /wayne:$(RELEASE_VERSION )
50+ docker push $( REGISTRY_URI ) /wayne:$(RELEASE_VERSION )
5251
5352
5453# # server builder image
5554build-server-image :
5655 cd hack/build/server && docker build --no-cache \
57- -t 360cloud /wayne-server-builder:$(SERVER_BUILD_VERSION ) .
56+ -t $( REGISTRY_URI ) /wayne-server-builder:$(SERVER_BUILD_VERSION ) .
5857
5958# # ui builder image
6059build-ui-image :
61- docker build -f hack/build/ui/Dockerfile -t 360cloud /wayne-ui-builder:$(UI_BUILD_VERSION ) .
60+ docker build -f hack/build/ui/Dockerfile -t $( REGISTRY_URI ) /wayne-ui-builder:$(UI_BUILD_VERSION ) .
6261
File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ GO_MAIN=src/backend/main.go
4+ PACKAGE_JSON=src/frontend/package.json
5+ SWAGGER_VERSION_GO=src/backend/controllers/openapi/openapi.go
6+
7+ VERSION=(` grep -Eo " v[0-9]+\.[0-9]+\.[0-9]+[a-z0-9\-]*" ${GO_MAIN} ` )
8+ NEXT_VERSION=$( git describe --always --tags)
9+
10+ echo " Project current version: [$VERSION ], next_version:[$NEXT_VERSION ] "
11+
12+ sed -i " s/$VERSION /$NEXT_VERSION /" ${GO_MAIN}
13+ sed -i ' s/\("version": "\)' $VERSION ' /\1' $NEXT_VERSION ' /' $PACKAGE_JSON
14+ sed -i ' s/\(Version: \)' $VERSION ' /\1' $NEXT_VERSION ' /' $SWAGGER_VERSION_GO
Original file line number Diff line number Diff line change 1414// Schemes: https
1515// Host: localhost
1616// BasePath: /openapi/v1/gateway/action
17- // Version: 1 .1.0
17+ // Version: v1 .1.0
1818//
1919// Consumes:
2020// - application/json
Original file line number Diff line number Diff line change 44 "github.com/Qihoo360/wayne/src/backend/cmd"
55)
66
7- var Version string = "1 .1.0"
7+ const Version = "v1 .1.0"
88
99func main () {
1010 cmd .Version = Version
Original file line number Diff line number Diff line change 11{
22 "name" : " frontend" ,
3- "version" : " 1 .1.0" ,
3+ "version" : " v1 .1.0" ,
44 "license" : " MIT" ,
55 "scripts" : {
66 "ng" : " ng" ,
You can’t perform that action at this time.
0 commit comments