Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Fix make release script
Browse files Browse the repository at this point in the history
  • Loading branch information
ddurieux committed Jun 21, 2022
1 parent 419b132 commit 25bb4ce
Showing 1 changed file with 19 additions and 10 deletions.
29 changes: 19 additions & 10 deletions tools/make_release.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# /**
# * ---------------------------------------------------------------------
# * GLPI - Gestionnaire Libre de Parc Informatique
Expand Down Expand Up @@ -73,12 +73,12 @@ else
echo "$RELEASE has not been found in setup.php. Exiting."
exit 1;
fi
if grep --quiet $RELEASE fusioninventory.xml; then
echo "$RELEASE found in fusioninventory.xml, OK."
else
echo "$RELEASE has not been found in fusioninventory.xml. Exiting."
exit 1;
fi
# if grep --quiet $RELEASE fusioninventory.xml; then
# echo "$RELEASE found in fusioninventory.xml, OK."
# else
# echo "$RELEASE has not been found in fusioninventory.xml. Exiting."
# exit 1;
# fi
if grep --quiet $RELEASE js/footer.js; then
echo "$RELEASE found in js/footer.js, OK."
else
Expand All @@ -92,6 +92,18 @@ if ! xmllint --noout fusioninventory.xml; then
exit 1;
fi

echo "Remove vendor if exists"
\rm -fr vendor

echo "Remove all minify js files"
find ./ -type f -name "*.min.js" -exec \rm {} \;

echo "Minify javascripts"
find ./ -type f \
-name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \
-exec echo {} \; \
-exec sh -c 'uglifyjs -o "${1%.*}.min.js" "$1"' sh {} \;

echo "Retrieve PHP vendor"
composer install --no-dev --optimize-autoloader --prefer-dist --quiet

Expand All @@ -101,9 +113,6 @@ sed \
-e 's/ SNAPSHOT//' \
-i '' setup.php

echo "Minify stylesheets and javascripts"
$INIT_PWD/vendor/bin/robo minify

echo "Compile locale files"
./tools/update_mo.pl

Expand Down

0 comments on commit 25bb4ce

Please sign in to comment.