Browse Source

Allow skipping JS asset building in build script.

pull/4344/head
Jamie Taylor 3 months ago
parent
commit
60d1eb0341
No account linked to committer's email address
1 changed files with 18 additions and 10 deletions
  1. 18
    10
      build.sh

+ 18
- 10
build.sh View File

@@ -9,11 +9,6 @@ if [ -z "${OSU_SKIP_CACHE_PERMISSION_OVERRIDE:-}" ]; then
9 9
     chmod -R 777 storage bootstrap/cache || true
10 10
 fi
11 11
 
12
-if [ ! -d node_modules ]; then
13
-  mkdir -p ~/node_modules
14
-  ln -snf ~/node_modules node_modules
15
-fi
16
-
17 12
 if [ -f composer.phar ]; then
18 13
   php composer.phar self-update
19 14
 else
@@ -37,12 +32,25 @@ php artisan view:clear
37 32
 # e.g. OSU_SKIP_DB_MIGRATION=1 ./build.sh to bypass running migrations
38 33
 if [ -z "${OSU_SKIP_DB_MIGRATION:-}" ]; then
39 34
   php artisan migrate --force
35
+else
36
+  echo "OSU_SKIP_DB_MIGRATION set, skipping DB migration."
40 37
 fi
41 38
 
42 39
 php artisan passport:keys
43
-php artisan laroute:generate
44 40
 
45
-command -v yarn || npm install -g yarn
46
-yarn
47
-yarn run generate-localizations
48
-yarn run production
41
+# e.g. OSU_SKIP_ASSET_BUILD=1 ./build.sh to bypass building javascript assets
42
+if [ -z "${OSU_SKIP_ASSET_BUILD:-}" ]; then
43
+  if [ ! -d node_modules ]; then
44
+    mkdir -p ~/node_modules
45
+    ln -snf ~/node_modules node_modules
46
+  fi
47
+
48
+  php artisan laroute:generate
49
+
50
+  command -v yarn || npm install -g yarn
51
+  yarn
52
+  yarn run generate-localizations
53
+  yarn run production
54
+else
55
+  echo "OSU_SKIP_ASSET_BUILD set, skipping javascript asset build."
56
+fi

Loading…
Cancel
Save