From eae821f40251ca8daa2366e763fd89451b19170d Mon Sep 17 00:00:00 2001
From: Tim van Dijen <tvdijen@gmail.com>
Date: Fri, 7 Dec 2018 17:58:24 +0100
Subject: [PATCH] Update build-release.sh

Run `npm run build` now
---
 bin/build-release.sh | 28 +++++++++++-----------------
 1 file changed, 11 insertions(+), 17 deletions(-)

diff --git a/bin/build-release.sh b/bin/build-release.sh
index d123533ee..7a20ca619 100755
--- a/bin/build-release.sh
+++ b/bin/build-release.sh
@@ -36,37 +36,31 @@ cd $TARGET
 git checkout $TAG
 cd ..
 
-# Use composer only on newer versions that have a composer.json
-if [ -f "$TARGET/composer.json" ]; then
-    if [ ! -x "$TARGET/composer.phar" ]; then
-        curl -sS https://getcomposer.org/installer | php -- --install-dir=$TARGET
-    fi
-
-    # Install dependencies (without vcs history or dev tools)
-    php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET"
+if [ ! -x "$TARGET/composer.phar" ]; then
+    curl -sS https://getcomposer.org/installer | php -- --install-dir=$TARGET
 fi
 
-# Use npm only on newer versions that have a package.json
-if [ -f "$TARGET/package.json" ]; then
-    npm install
-    npm audit fix
-fi
+# Install dependencies (without vcs history or dev tools)
+php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET"
+
+npm install
+npm audit fix
+npm run build
 
 mkdir -p "$TARGET/config" "$TARGET/metadata" "$TARGET/cert" "$TARGET/log" "$TARGET/data"
 cp -rv "$TARGET/config-templates/"* "$TARGET/config/"
 cp -rv "$TARGET/metadata-templates/"* "$TARGET/metadata/"
 rm -rf "$TARGET/.git"
 rm "$TARGET/.coveralls.yml"
-rm "$TARGET/.travis.yml"
+rm "$TARGET/.editorconfig"
+rm "$TARGET/.gitattributes"
 rm "$TARGET/.php_cs.dist"
+rm "$TARGET/.travis.yml"
 rm "$TARGET/psalm.xml"
 rm "$TARGET"/{,modules}/.gitignore
-rm "$TARGET/.gitattributes"
 rm "$TARGET"/{cache,config,metadata,locales}/.gitkeep
-rm "$TARGET/.editorconfig"
 rm "$TARGET/composer.phar"
 tar --owner 0 --group 0 -cvzf "$TARGET.tar.gz" "$TARGET"
 rm -rf "$TARGET"
 
 echo "Created: /tmp/$TARGET.tar.gz"
-
-- 
GitLab