Mercurial > p > roundup > code
comparison scripts/Docker/roundup_start @ 7661:b31343f16153
fix: roundup_start script exited for 2.3.0 roundup.
I added 'set -eo pipefail' and must have missed a test case that
caused demo mode to exit. Fix this.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 16 Oct 2023 22:19:45 -0400 |
| parents | 0f6b7a70bc43 |
| children | cf5d37182dc9 |
comparison
equal
deleted
inserted
replaced
| 7660:f4a6f14e5cd6 | 7661:b31343f16153 |
|---|---|
| 13 if ! [ -z "$SHELL_DEBUG" ]; then | 13 if ! [ -z "$SHELL_DEBUG" ]; then |
| 14 set -xv | 14 set -xv |
| 15 fi | 15 fi |
| 16 | 16 |
| 17 trap exit INT | 17 trap exit INT |
| 18 trap "echo 'Exiting on pipefail'" ERR | |
| 18 | 19 |
| 19 do_exit=0 | 20 do_exit=0 |
| 20 | 21 |
| 21 if test -t 0 -a -t 1; then # see if stdin/out are associated with a tty | 22 if test -t 0 -a -t 1; then # see if stdin/out are associated with a tty |
| 22 might_be_interactive="true" | 23 might_be_interactive="true" |
| 36 if [ -z "$directory" ]; then | 37 if [ -z "$directory" ]; then |
| 37 # $tracker_spec was not in the form of a=b, check to see | 38 # $tracker_spec was not in the form of a=b, check to see |
| 38 # if it's a request to start in demo/shell mode: | 39 # if it's a request to start in demo/shell mode: |
| 39 case "$tracker" in | 40 case "$tracker" in |
| 40 demo) | 41 demo) |
| 41 version=$(roundup-admin -v | grep 2.2.0) | 42 # if grep does not find 2.2.0 it exits non-zero and |
| 43 # because of "-eo pipefail" the script exits. So || true | |
| 44 # so pipeline exits true. | |
| 45 version=$(roundup-admin -v | grep '2\.2\.0' || true) | |
| 42 if [ -n "$version" ]; then | 46 if [ -n "$version" ]; then |
| 43 printf "\nRoundup version: %s does not support docker demo mode\n" "$version" | 47 printf "\nRoundup version: %s does not support docker demo mode\n" "$version" |
| 44 printf "Try building with a version newer than 2.2.0.\n" | 48 printf "Try building with a version newer than 2.2.0.\n" |
| 45 printf "For example:\n" | 49 printf "For example:\n" |
| 46 printf " docker build --build-arg=\"source=pypi~=2.3.0a1\" ...\n" | 50 printf " docker build --build-arg=\"source=pypi~=2.3.0a1\" ...\n" |
