@@ -230,62 +230,13 @@ CONFIG_VALUES=$(echo "$CONFIG_JSON" | jq -r '
230
230
read -r COMPILE_SCSS
231
231
} <<< " $CONFIG_VALUES"
232
232
233
- install_dependencies () {
234
- if [[ " ${USE_TSC,,} " == " true" ]]; then
235
- installTypeScriptCompiler &
236
- fi
237
-
238
- if [[ " ${USE_SASS,,} " == " true" ]]; then
239
- chmod +x " $GITHUB_ACTION_PATH /src/time.py" && \
240
- installHomebrew && \
241
- installDartSass &
242
- fi
243
-
244
- wait
245
- }
246
233
TIME4=$( current_time_ms)
247
234
PREPROCESSED=" n"
248
- compile_assets () {
249
- checkForDartSass () {
250
- if ! command -v sass & > /dev/null; then
251
- local ERROR_MESSAGE=$( ErrorMessage " run.sh" " 0134" )
252
- echo -e " ::error::$ERROR_MESSAGE " && exit 1
253
- fi
254
- }
255
-
256
- if [[ " ${COMPILE_TS,,} " == " true" ]]; then
257
- PREPROCESSED=" y"
258
- source " $GITHUB_ACTION_PATH /lib/compile.sh"
259
- tojs " $INPUT_PATH "
260
- local DOCLEANUP=$( javascript $GITHUB_ACTION_PATH /src/check-cleanup.js " " ) && \
261
- if [[ " $DOCLEANUP " == ' y' ]]; then
262
- clearall " $INPUT_PATH " " ts"
263
- fi &
264
- fi
265
-
266
- if [[ " ${COMPILE_SASS,,} " == " true" ]]; then
267
- PREPROCESSED=" y"
268
- checkForDartSass
269
- source " $GITHUB_ACTION_PATH /lib/compile.sh"
270
- tocss " $INPUT_PATH " " sass"
271
- local DOCLEANUP=$( javascript $GITHUB_ACTION_PATH /src/check-cleanup.js " " ) && \
272
- if [[ " $DOCLEANUP " == ' y' ]]; then
273
- clearall " $INPUT_PATH " " sass"
274
- fi &
275
- fi
276
-
277
- if [[ " ${COMPILE_SCSS,,} " == " true" ]]; then
278
- PREPROCESSED=" y"
279
- checkForDartSass
280
- source " $GITHUB_ACTION_PATH /lib/compile.sh"
281
- tocss " $INPUT_PATH " " scss"
282
- local DOCLEANUP=$( javascript $GITHUB_ACTION_PATH /src/check-cleanup.js " " ) && \
283
- if [[ " $DOCLEANUP " == ' y' ]]; then
284
- clearall " $INPUT_PATH " " scss"
285
- fi &
235
+ checkForDartSass () {
236
+ if ! command -v sass & > /dev/null; then
237
+ local ERROR_MESSAGE=$( ErrorMessage " run.sh" " 0134" )
238
+ echo -e " ::error::$ERROR_MESSAGE " && exit 1
286
239
fi
287
-
288
- wait
289
240
}
290
241
291
242
Y=" true"
@@ -294,8 +245,37 @@ if [ -z "$TYPE" ]; then
294
245
echo -e " ::error::$ERROR_MESSAGE " && exit 1
295
246
fi
296
247
297
- install_dependencies && \
298
- compile_assets && \
248
+ if [[ " ${USE_TSC,,} " == " $Y " ]]; then
249
+ installTypeScriptCompiler
250
+ fi && \
251
+ if [[ " ${USE_SASS,,} " == " $Y " ]]; then
252
+ if [ -d " _just_temp" ]; then
253
+ ERROR_MESSAGE=$( ErrorMessage " important_dirs" " 0130" )
254
+ echo -e " ::error::$ERROR_MESSAGE " && exit 1
255
+ fi
256
+ installHomebrew && installDartSass
257
+ fi && \
258
+ if [[ " ${COMPILE_TS,,} " == " $Y " ]]; then
259
+ PREPROCESSED=" y"
260
+ if ! command -v tsc > /dev/null; then
261
+ ERROR_MESSAGE=$( ErrorMessage " run.sh" " 0133" )
262
+ echo -e " ::error::$ERROR_MESSAGE " && exit 1
263
+ fi
264
+ source $GITHUB_ACTION_PATH /lib/compile.sh
265
+ tojs " $INPUT_PATH "
266
+ fi && \
267
+ if [[ " ${COMPILE_SASS,,} " == " $Y " ]]; then
268
+ PREPROCESSED=" y"
269
+ checkForDartSass
270
+ source $GITHUB_ACTION_PATH /lib/compile.sh
271
+ tocss " $INPUT_PATH " " sass"
272
+ fi && \
273
+ if [[ " ${COMPILE_SCSS,,} " == " $Y " ]]; then
274
+ PREPROCESSED=" y"
275
+ checkForDartSass
276
+ source $GITHUB_ACTION_PATH /lib/compile.sh
277
+ tocss " $INPUT_PATH " " scss"
278
+ fi && \
299
279
if [[ " $PREPROCESSED " == " y" ]]; then
300
280
TIME5=$( current_time_ms) && \
301
281
PRESECONDS=$( calculate_duration " $TIME4 " " $TIME5 " ) && \
0 commit comments