diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 93a21899..c77c962a 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -53,4 +53,4 @@ RUN bash -c ". /tmp/update-composer.sh" && rm /tmp/update-composer.sh RUN bash -c ". /tmp/scaffold-project.sh" && rm /tmp/scaffold-project.sh # Force the docker image to build by incrementing this value -ENV INVALIDATE_CACHE=306 \ No newline at end of file +ENV INVALIDATE_CACHE=307 \ No newline at end of file diff --git a/.gp/bash/init-optional-scaffolding.sh b/.gp/bash/init-optional-scaffolding.sh index bd01c93e..39e0ee49 100644 --- a/.gp/bash/init-optional-scaffolding.sh +++ b/.gp/bash/init-optional-scaffolding.sh @@ -27,6 +27,8 @@ rrd_ver=$(eval "$parse" react-router-dom version) laravel_major_ver=$(bash .gp/bash/helpers.sh laravel_major_version) laravel_ui_ver=$(bash .gp/bash/helpers.sh laravel_ui_version) init_phpmyadmin=".gp/bash/init-phpmyadmin.sh" +react_examp_warn1="WARNING: React examples require Laravel version >= 8." +react_examp_warn2="WARNING: Ignoring the example requested:" # Any value set for EXAMPLE will build an example project thus superceding some directives in starter.ini if [[ -n $EXAMPLE ]]; then @@ -35,11 +37,16 @@ if [[ -n $EXAMPLE ]]; then case $EXAMPLE in 1) example_title="React Example with phpMyAdmin and extras - Questions and Answers" - init_react_example=".gp/bash/examples/init-react-example.sh" - install_react=1 - install_phpmyadmin=1 - install_react_router_dom=1 - rrd_ver='^5.2.0' + if [[ $laravel_major_ver -lt 8 ]]; then + log -e "$react_examp_warn1 Your Laravel version is $laravel_major_ver" + log -e "$react_examp_warn2 $example_title" + else + init_react_example=".gp/bash/examples/init-react-example.sh" + install_react=1 + install_phpmyadmin=1 + install_react_router_dom=1 + rrd_ver='^5.2.0' + fi ;; 2) example_title="React Example without phpMyAdmin and no extras - Questions and Answers" @@ -254,10 +261,6 @@ fi # BEGIN: optional example setup # Initialize optional react example project if [[ -n $init_react_example ]];then - [[ $laravel_major_ver -lt 8 ]] \ - && log -e "WARNING: React examples require Laravel version >= 8. Your Laravel version is $laravel_major_ver" \ - && log -e "WARNING: Ignoring the example requested: $example_title" \ - && exit # shellcheck source=.gp/bash/examples/init-react-example.sh . "$init_react_example" 2>/dev/null || log_silent -e "ERROR: $(. $init_react_example 2>&1 1>/dev/null)" exit diff --git a/starter.ini b/starter.ini index 9687dc51..e596c4ce 100644 --- a/starter.ini +++ b/starter.ini @@ -49,7 +49,7 @@ type=laravel-js-2space # https://github.com/gitpod-io/workspace-images/blob/master/chunks/tool-nginx/Dockerfile # Invalid values will default to 'gitpodlatest' # Note: Laravel 9.* requires PHP 8.* -version=8.0 +version=gitpodlatest # ppa, valid values are OS and ondrej # The value 'OS' will use the standard (default) operating system PPA # The value 'ondrej' will use ppa:ondrej/php @@ -121,7 +121,7 @@ install=0 # Laravel always gives you the latest or most stable Minor and Patch versions which are non-breaking. # The version value is for initial setup only and is ignored once the Laravel scaffolding have been pushed # to your repository. -version=9.* +version=7.* # allow_mixed_web # Valid values are 0 (off) or 1 (on). Only turn this off if you know what you are doing. # Default value is 1