File tree 2 files changed +26
-26
lines changed 2 files changed +26
-26
lines changed Original file line number Diff line number Diff line change 5
5
#
6
6
# init-complete.sh
7
7
# Description:
8
- # Tasks to be run everytime a gitpod workspace is created or started .
8
+ # Code to be run just once at the very end of workspace initialization .
9
9
#
10
10
# Notes:
11
11
# Always call this file last from the 'init' command in .gitpod.yml
12
12
13
+ # BEGIN: Laravel routes/web.php injection
14
+ allow_mixed_web=$( bash .gp/bash/utils.sh parse_ini_value starter.ini laravel install)
15
+ if [[ $allow_mixed_web != 0 ]]; then
16
+ laravel_web=routes/web.php
17
+ laravel_web_snippet=.gp/snippets/laravel/routes/web/allow-mixed-web.snippet
18
+ if [[ -e $laravel_web ]]; then
19
+ msg=" Injecting $laravel_web file"
20
+ [[ ! -e $laravel_web_snippet ]] && fail=1 && msg=" Missing injection file $laravel_web_snippet "
21
+ [[ $fail != 1 ]] && log_silent " $msg " && start_spinner " $msg "
22
+ cat " $laravel_web_snippet " >> " $laravel_web "
23
+ err_code=$?
24
+ if [[ $err_code != 0 || $fail == 1 ]]; then
25
+ [[ $fail == 1 ]] || stop_spinner 1
26
+ log -e " ERROR: $msg "
27
+ else
28
+ stop_spinner 0
29
+ log_silent " SUCCESS: $msg "
30
+ fi
31
+ else
32
+ log " ERROR: no $laravel_web file to inject"
33
+ fi
34
+ fi
35
+ # END: Laravel routes/web.php injection
36
+
13
37
# Summarize results
14
38
bash .gp/bash/helpers.sh show_first_run_summary
15
39
echo -e " \e[38;5;194mIf everything looks good in the above results then push any new\nproject files to your git repository. Your project is ready to code.\e[0m"
Original file line number Diff line number Diff line change @@ -92,31 +92,7 @@ if [ ! -d "$GITPOD_REPO_ROOT/vendor" ]; then
92
92
log ' ERROR: no Laravel .env file to inject'
93
93
fi
94
94
# END: Laravel .env injection
95
-
96
- # BEGIN: Laravel routes/web.php injection
97
- allow_mixed_web=$( bash .gp/bash/utils.sh parse_ini_value starter.ini laravel install)
98
- if [[ $allow_mixed_web != 0 ]]; then
99
- laravel_web=public/routes/web.php
100
- laravel_web_snippet=.gp/snippets/laravel/routes/web/allow-mixed-web.snippet
101
- if [[ -e $laravel_web ]]; then
102
- msg=" Injecting $laravel_web file"
103
- [[ ! -e $laravel_web_snippet ]] && fail=1 && msg=" Missing injection file $laravel_web_snippet "
104
- [[ $fail != 1 ]] && log_silent " $msg " && start_spinner " $msg "
105
- cat " $laravel_web_snippet " >> " $laravel_web "
106
- err_code=$?
107
- if [[ $err_code != 0 || $fail == 1 ]]; then
108
- [[ $fail == 1 ]] || stop_spinner 1
109
- log -e " ERROR: $msg "
110
- else
111
- stop_spinner 0
112
- log_silent " SUCCESS: $msg "
113
- fi
114
- else
115
- log " ERROR: no $laravel_web file to inject"
116
- fi
117
- fi
118
- # END: Laravel routes/web.php injection
119
-
95
+
120
96
# Configure .editorconfig
121
97
if [ -e .editorconfig ]; then
122
98
ec_type=$( bash .gp/bash/utils.sh parse_ini_value starter.ini .editorconfig type)
You can’t perform that action at this time.
0 commit comments