From d35d75ae196c7007d2a3900af7a64f4087f11cf5 Mon Sep 17 00:00:00 2001 From: Dennis Ried Date: Mon, 2 Dec 2024 10:57:36 +0100 Subject: [PATCH] shell script to start sencha (#434) * adding shell to start a docker with sencha * added flag -d to build script to run in docker * added comment * removed startSencha script * adding shell to start a docker with sencha * added flag -d to build script to run in docker * added comment * removed startSencha script * param for environment (testing/production) via argument --------- Co-authored-by: Daniel Jettka --- build.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/build.sh b/build.sh index eb6e440c5..e6959a5b1 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,25 @@ #!/bin/sh +while getopts "d" flag; do + case $flag in + d) # Handle the -d flag + # run docker + echo "Running in Docker..." + # remove -d from the list of input arguments + shift $((OPTIND-1)) + # set a variable OPTIONS with the remaining input arguments to pass to the build command + OPTIONS=${@} + # run docker + docker run --rm -it -v `pwd`:/app --name sencha ghcr.io/bwbohl/sencha-cmd:latest ./build.sh $OPTIONS + exit + ;; + \?) + # Handle invalid options + ;; + esac +done + + # cleaning the build dir sencha ant clean