Index: local/run.vend.patch.sh =================================================================== diff -u -r2e2f8d68148ca4d89fb8ae3029b72ed8956a6f93 -rc78c8f7036c184cc43b8099d35baa36b4106bb29 --- local/run.vend.patch.sh (.../run.vend.patch.sh) (revision 2e2f8d68148ca4d89fb8ae3029b72ed8956a6f93) +++ local/run.vend.patch.sh (.../run.vend.patch.sh) (revision c78c8f7036c184cc43b8099d35baa36b4106bb29) @@ -1,7 +1,11 @@ #!/bin/bash SCRIPT_PATH=$(dirname $(realpath "$0")) -BUILD_NUMBER=$SCRIPT_PATH/build_number.sh + +# getting the old and new incremented build numbers from the build file. +BUILD_SCRIPT=$SCRIPT_PATH/build_number.sh +IFS=" " read -r BUILD_NUMBER_OLD BUILD_NUMBER_CUR BUILD_NUMBER_NXT <<< $($BUILD_SCRIPT) + CURRNET_DATE=$(date +%Y_%m_%d) CURRENT_GUSER="Behrouz NematiPour" CURRENT_GEMAIL="bNematiPour@diality.com" @@ -15,6 +19,10 @@ git config --global --replace-all user.name "$CURRENT_GUSER" git config --global --replace-all user.email "$CURRENT_GEMAIL" +function zero_pad_2() { + echo $(printf "%.2d" $1) +} + function current_branch() { repo_folder="$1" if [[ -z $repo_folder ]]; then @@ -33,7 +41,7 @@ function patch_sources() { PASS=$(pwgen -ABcsnv1 16) - build_number="Build-"$(printf "%.2d" $($BUILD_NUMBER)) + build_number="Build-"$(zero_pad_2 $BUILD_NUMBER_CUR) cd DEV_TEST_DIR=$HOME/Diality_Dev_Test_$CURRNET_DATE"_"$build_number @@ -42,6 +50,9 @@ cd $DEV_TEST_DIR zip --password=$PASS -r $DEV_TEST_DIR.zip application + $HOME/Projects/application/cr_objectives.sh "LTTS_"$(zero_pad_2 $BUILD_NUMBER_OLD) > $DEV_TEST_DIR.log + #TODO: Add taging the source + echo $PASS > $DEV_TEST_DIR.pas cd @@ -104,10 +115,10 @@ confirm "[ Simulator ]" $SIMULATOR_SOURCE echo "current [ DENALI ] version is [" $($DENALI_SOURCE -v) "]" -read -p "Continue?" +read -p "Continue?(CTRL+C to cancel)" if [[ "$1" == "--reset" ]]; then - $BUILD_NUMBER -- $2 + $BUILD_SCRIPT -- $2 fi if [[ "$1" == "--source" ]]; then