diff --git a/bin/build-release.sh b/bin/build-release.sh index d123533ee0081b23aa84251938c9ee43bb477c6c..7a20ca6199659b7cee5c89b0cedd31e4410fd955 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" -