[Build] fix script error in build.sh
authorWonyoung Choi <wy80.choi@samsung.com>
Wed, 29 Aug 2018 03:52:50 +0000 (12:52 +0900)
committerWonyoung Choi <wy80.choi@samsung.com>
Wed, 29 Aug 2018 03:52:50 +0000 (12:52 +0900)
build.sh

index 8a5a50aa8cb3fdced372af368bc69b4528422c0e..f94cc326c0b414c1be7452bda6d0c49f97f87241 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -11,6 +11,8 @@ DOTNET_CMD="$RETRY_CMD $TIMEOUT_CMD 600 dotnet"
 
 RUN_BUILD="$DOTNET_CMD msbuild $SCRIPT_DIR/build/build.proj /nologo"
 
+VERSION_PREFIX=5.0.0
+
 usage() {
   echo "Usage: $0 [command] [args]"
   echo "Commands:"
@@ -22,10 +24,6 @@ usage() {
   echo "    clean              Clean all artifacts"
 }
 
-
-CI_VERSION_PREFIX=5.0.0
-CI_VERSION=$CI_VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
-
 cmd_build() {
   if [ -z "$1" ]; then
     echo "No module specified."
@@ -68,7 +66,7 @@ cmd_ext_build() {
 cmd_pack() {
   VERSION=$1
   if [ -z "$VERSION" ]; then
-    VERSION=$CI_VERSION
+    VERSION=$VERSION_PREFIX.$((10000+$(git rev-list --count HEAD)))
   fi
 
   $RUN_BUILD /t:pack /p:Version=$VERSION