Skip to content

Commit

Permalink
Ignore running docker when scripts are missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
mosbth committed Oct 30, 2020
1 parent 4468484 commit 4d16c10
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions REVISION.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ v2.4.0 (2020-10-29)

* Include functions hasGitTagBetween and getSemanticVersion to be able to use outside of docker.
* Include functions openUrl and openSpecificUrl.
* Ignore running docker when scripts are missing.



Expand Down
15 changes: 11 additions & 4 deletions gui.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# GUI for dbwebb inspect.
#
VERSION="v2.3.10 (2020-10-28)"
VERSION="v2.4.0 (2020-10-29)"

# Messages
MSG_OK="\033[0;30;42mOK\033[0m"
Expand Down Expand Up @@ -1201,10 +1201,17 @@ makeDockerRunExtras()
# echo 'make docker-run-server container="server" what="bash $script $kmom $acronym"' | tee -a "$LOGFILE"
# make docker-run-server container="server" what="bash $script $kmom $acronym" 2>&1 | tee -a "$LOGFILE"

# Run the scripts using run.bash through docker-compose
header "Docker run scripts" | tee -a "$LOGFILE"
echo "docker-compose -f docker-compose.yaml run --service-ports server bash $script $kmom $acronym" | tee -a "$LOGFILE"
docker-compose -f docker-compose.yaml run --service-ports server bash $script $kmom $acronym 2>&1 | tee -a "$LOGFILE"

# Only if there are scripts to execute for kmom
local kmomScripts="$path/../$kmom"
if [[ ! -d "$kmomScripts" || -z "$(ls -A $kmomScripts)" ]]; then
echo "No script to execute in docker." | tee -a "$LOGFILE"
else
# Run the scripts using run.bash through docker-compose
echo "docker-compose -f docker-compose.yaml run --service-ports server bash $script $kmom $acronym" | tee -a "$LOGFILE"
docker-compose -f docker-compose.yaml run --service-ports server bash $script $kmom $acronym 2>&1 | tee -a "$LOGFILE"
fi
}


Expand Down

0 comments on commit 4d16c10

Please sign in to comment.