Index: local/run.coco.sh =================================================================== diff -u -r69e2206766124aed71e9cba9792aa256c223ecda -r23d228183fb3bea51cdefa7979f20345b4198dbd --- local/run.coco.sh (.../run.coco.sh) (revision 69e2206766124aed71e9cba9792aa256c223ecda) +++ local/run.coco.sh (.../run.coco.sh) (revision 23d228183fb3bea51cdefa7979f20345b4198dbd) @@ -11,6 +11,16 @@ REPORT_PATH=$WORKING_DIR/$REPORT LOG_PATH=$REPORT_PATH/$LOG +COCO_SERVER=192.168.10.41 + +function check_server() { +ping 192.168.100.41 -c 2 -W 1 +if [ -n "$?" ]; then + echo "Coco Lic Server unreachable" + exit 1000 +fi +} + function cleanup() { rm -frd $WORKING_DIR create_folders Index: local/run.vend.patch.sh =================================================================== diff -u -radacb0fc57fd0e03eaf98600feae4c8e55b9dcec -r23d228183fb3bea51cdefa7979f20345b4198dbd --- local/run.vend.patch.sh (.../run.vend.patch.sh) (revision adacb0fc57fd0e03eaf98600feae4c8e55b9dcec) +++ local/run.vend.patch.sh (.../run.vend.patch.sh) (revision 23d228183fb3bea51cdefa7979f20345b4198dbd) @@ -4,16 +4,36 @@ CURRENT_GUSER="Behrouz NematiPour" CURRENT_GEMAIL="bNematiPour@diality.com" +APPICATION_SOURCE=$HOME/Projects/application +DIALIN_SOURCE=$HOME/Projects/dialin/dialin +SIMULATOR_SOURCE=$HOME/Projects/simulator +DENALI_SOURCE=$HOME/Projects/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release/denali + # set the userr to the default, there were some scripts which were changing the git user. git config --global --replace-all user.name "$CURRENT_GUSER" git config --global --replace-all user.email "$CURRENT_GEMAIL" +function current_branch() { + repo_folder="$1" + if [[ -z $repo_folder ]]; then + echo "Not a repository." + exit 1 + fi + echo $(git -C "$repo_folder" symbolic-ref --short HEAD) +} + +function confirm() { + repo_name="$1" + repo_folder="$2" + echo "current $1 branch is [" $(current_branch $repo_folder) "]" +} + function patch_sources() { - PASS=$(pwgen -ABcsnv1 16) + PASS=$(pwgen -ABcsnv1 16) cd DEV_TEST_DIR=$HOME/Diality_Dev_Test_$CURRNET_DATE - rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" Projects/application $DEV_TEST_DIR + rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" $APPICATION_SOURCE $DEV_TEST_DIR cd $DEV_TEST_DIR zip --password=$PASS -r $DEV_TEST_DIR.zip application @@ -25,16 +45,14 @@ } function update_outsource_dialin() { - DIALIN_SOURCE=$HOME/Projects/dialin/dialin/* DIALIN_OUTSOURCE=$HOME/Projects/outsource/dialin/ - COMMIT_MESSAGE=$CURRNET_DATE if [[ -n "$1" ]]; then COMMIT_MESSAGE="$1" fi echo " ---------- Updating the dialin outsource folder" - rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" --exclude="__pychache__" $DIALIN_SOURCE $DIALIN_OUTSOURCE + rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" --exclude="__pychache__" $DIALIN_SOURCE/* $DIALIN_OUTSOURCE echo " ---------- push to the server [$COMMIT_MESSAGE]" cd $DIALIN_OUTSOURCE @@ -44,16 +62,14 @@ } function update_outsource_simulator() { - SIMULATOR_SOURCE=$HOME/Projects/simulator/* SIMULATOR_OUTSOURCE=$HOME/Projects/outsource/simulator/ - COMMIT_MESSAGE=$CURRNET_DATE if [[ -n "$1" ]]; then COMMIT_MESSAGE="$1" fi echo " ---------- Updating the simulator outsource folder" - rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" --exclude="__pychache__" $SIMULATOR_SOURCE $SIMULATOR_OUTSOURCE + rsync -Lr --exclude=".*" --exclude="*.log" --exclude="*.err" --exclude="*.swp" --exclude="__pychache__" $SIMULATOR_SOURCE/* $SIMULATOR_OUTSOURCE echo " ---------- push to the server [$COMMIT_MESSAGE]" cd $SIMULATOR_OUTSOURCE @@ -62,6 +78,30 @@ git push -u origin master } +function update_outsource_denali() { + DENALI_OUTSOURCE=$HOME/Projects/outsource/denali/ + COMMIT_MESSAGE=$CURRNET_DATE + if [[ -n "$1" ]]; then + COMMIT_MESSAGE="$1" + fi + + echo " ---------- Updating the denali outsource folder" + cp $DENALI_SOURCE $DENALI_OUTSOURCE + + echo " ---------- push to the server [$COMMIT_MESSAGE]" + cd $DENALI_OUTSOURCE + git add . + git commit -m "$COMMIT_MESSAGE" + git push -u origin master +} + +confirm "[ Application ]" $APPICATION_SOURCE +confirm "[ Dialin ]" $DIALIN_SOURCE +confirm "[ Simulator ]" $SIMULATOR_SOURCE +echo "current [ DENALI ] version is [" $($DENALI_SOURCE -v) "]" + +read -p "Continue?" + if [[ "$1" == "--source" ]]; then patch_sources fi @@ -74,10 +114,14 @@ update_outsource_simulator "$2" fi +if [[ "$1" == "--denali" ]]; then + update_outsource_denali "$2" +fi + if [[ "$1" == "" ]]; then echo "Usage:" echo "./run.vend.patch