asifdxtreme commented on a change in pull request #222: SCB-120 Update the 
import path and build scripts
URL: 
https://github.com/apache/incubator-servicecomb-service-center/pull/222#discussion_r158579064
 
 

 ##########
 File path: version/version.go
 ##########
 @@ -21,7 +21,7 @@ import "github.com/astaxie/beego"
 var (
        // no need to modify
        // please use:
-       //      go build -ldflags "-X 
github.com/ServiceComb/service-center/version.VERSION=x.x.x"
+       //      go build -ldflags "-X 
github.com/apache/incubator-servicecomb-service-center/version.VERSION=x.x.x"
        // to set these values.
        VERSION   = "0.0.1"
 
 Review comment:
   No, the version number can be specified while making a new build, the 
version number is taken from env variable using go ldlflags, for example
   ```
   export GIT_COMMIT=XXXX
   export BUILD_NUMBER=XXXX
   GO_LDFLAGS="${GO_LDFLAGS} -X 
'github.com/apache/incubator-servicecomb-service-center/version.BUILD_TAG=$(date
 +%Y%m%d%H%M%S).$BUILD_NUMBER.$GIT_COMMIT'"
   GO_LDFLAGS="${GO_LDFLAGS} -X 
'github.com/apache/incubator-servicecomb-service-center/version.VERSION=XXXXX'"
   go build --ldflags "${GO_LDFLAGS}"
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to