Skip to content
Snippets Groups Projects
Unverified Commit 63f2703b authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Adapt the build script to the new deployment procudure.

Before calling npm to install dependencies and build, we need to step into the installation directory. Also, node_modules and the stylesheet.js* byproduct can be removed in production.
parent b422425c
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ if [ -z "$VERSION" ]; then ...@@ -15,7 +15,7 @@ if [ -z "$VERSION" ]; then
exit 1 exit 1
fi fi
if [ -z "$REPO" ]; then if [ -z "$REPOPATH" ]; then
REPOPATH="https://github.com/simplesamlphp/simplesamlphp.git" REPOPATH="https://github.com/simplesamlphp/simplesamlphp.git"
fi fi
...@@ -43,14 +43,18 @@ fi ...@@ -43,14 +43,18 @@ fi
# Install dependencies (without vcs history or dev tools) # Install dependencies (without vcs history or dev tools)
php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET" php "$TARGET/composer.phar" install --no-dev --prefer-dist -o -d "$TARGET"
cd $TARGET
npm install npm install
npm audit fix npm audit fix
npm run build npm run build
cd ..
mkdir -p "$TARGET/config" "$TARGET/metadata" "$TARGET/cert" "$TARGET/log" "$TARGET/data" mkdir -p "$TARGET/config" "$TARGET/metadata" "$TARGET/cert" "$TARGET/log" "$TARGET/data"
cp -rv "$TARGET/config-templates/"* "$TARGET/config/" cp -rv "$TARGET/config-templates/"* "$TARGET/config/"
cp -rv "$TARGET/metadata-templates/"* "$TARGET/metadata/" cp -rv "$TARGET/metadata-templates/"* "$TARGET/metadata/"
rm -rf "$TARGET/.git" rm -rf "$TARGET/.git"
rm -rf "$TARGET/node_modules"
rm "$TARGET/www/assets/js/stylesheet.js"*
rm "$TARGET/.coveralls.yml" rm "$TARGET/.coveralls.yml"
rm "$TARGET/.editorconfig" rm "$TARGET/.editorconfig"
rm "$TARGET/.gitattributes" rm "$TARGET/.gitattributes"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment