Skip to content

Commit

Permalink
Update build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ddurieux committed Jul 5, 2022
1 parent 1f1bdf2 commit 04babcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions tools/build_glpi.sh → tools/build_gsit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ echo "Install dependencies"
$WORKING_DIR/bin/console dependencies install --composer-options="--ignore-platform-reqs --prefer-dist --no-progress"

echo "Minify stylesheets and javascripts"
# need to have php < 8.0 to works
php -d memory_limit=2G $WORKING_DIR/vendor/bin/robo minify --load-from $WORKING_DIR/tools

echo "Compile SCSS"
Expand Down
12 changes: 6 additions & 6 deletions tools/make_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ if [ ! "$#" -eq 2 ]
then
echo "This script builds a release archive based on Git index of given directory."
echo ""
echo "Usage $0 /path/to/glpi-git-dir release-name"
echo "Usage $0 /path/to/gsit-git-dir release-name"
exit
fi

SOURCE_DIR=$(readlink -f $1)
RELEASE=$2
WORKING_DIR=/tmp/glpi-$RELEASE
TARBALL_PATH=/tmp/glpi-$RELEASE.tgz
WORKING_DIR=/tmp/gsit-$RELEASE
TARBALL_PATH=/tmp/gsit-$RELEASE.tgz

if [ ! -e $SOURCE_DIR ] || [ ! -e $SOURCE_DIR/.git ]
then
Expand All @@ -62,13 +62,13 @@ if [ -e $WORKING_DIR ]
then
rm -rf $WORKING_DIR
fi
git --git-dir="$SOURCE_DIR/.git" checkout-index --all --force --prefix="$WORKING_DIR/glpi/"
git --git-dir="$SOURCE_DIR/.git" checkout-index --all --force --prefix="$WORKING_DIR/gsit/"

echo "Building application"
$WORKING_DIR/glpi/tools/build_glpi.sh
$WORKING_DIR/gsit/tools/build_gsit.sh

echo "Creating tarball";
tar -c -z -f $TARBALL_PATH -C $WORKING_DIR glpi
tar -c -z -f $TARBALL_PATH -C $WORKING_DIR gsit

echo "Deleting temp directory"
rm -rf $WORKING_DIR
Expand Down

0 comments on commit 04babcd

Please sign in to comment.