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

Commit 087ba52

Browse files
committed
Fix make release script
1 parent bc1e760 commit 087ba52

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

tools/make_release.sh

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/bin/sh
22
# /**
33
# * ---------------------------------------------------------------------
44
# * GLPI - Gestionnaire Libre de Parc Informatique
@@ -73,12 +73,12 @@ else
7373
echo "$RELEASE has not been found in setup.php. Exiting."
7474
exit 1;
7575
fi
76-
if grep --quiet $RELEASE fusioninventory.xml; then
77-
echo "$RELEASE found in fusioninventory.xml, OK."
78-
else
79-
echo "$RELEASE has not been found in fusioninventory.xml. Exiting."
80-
exit 1;
81-
fi
76+
# if grep --quiet $RELEASE fusioninventory.xml; then
77+
# echo "$RELEASE found in fusioninventory.xml, OK."
78+
# else
79+
# echo "$RELEASE has not been found in fusioninventory.xml. Exiting."
80+
# exit 1;
81+
# fi
8282
if grep --quiet $RELEASE js/footer.js; then
8383
echo "$RELEASE found in js/footer.js, OK."
8484
else
@@ -92,6 +92,18 @@ if ! xmllint --noout fusioninventory.xml; then
9292
exit 1;
9393
fi
9494

95+
echo "Remove vendor if exists"
96+
\rm -fr vendor
97+
98+
echo "Remove all minify js files"
99+
find ./ -type f -name "*.min.js" -exec \rm {} \;
100+
101+
echo "Minify javascripts"
102+
find ./ -type f \
103+
-name "*.js" ! -name "*.min.*" ! -name "vfs_fonts*" \
104+
-exec echo {} \; \
105+
-exec sh -c 'uglifyjs -o "${1%.*}.min.js" "$1"' sh {} \;
106+
95107
echo "Retrieve PHP vendor"
96108
composer install --no-dev --optimize-autoloader --prefer-dist --quiet
97109

@@ -101,9 +113,6 @@ sed \
101113
-e 's/ SNAPSHOT//' \
102114
-i '' setup.php
103115

104-
echo "Minify stylesheets and javascripts"
105-
$INIT_PWD/vendor/bin/robo minify
106-
107116
echo "Compile locale files"
108117
./tools/update_mo.pl
109118

0 commit comments

Comments
 (0)