converter/deploy.sh

42 lines
1.4 KiB
Bash
Raw Normal View History

2016-08-15 20:28:23 +02:00
#!/bin/sh
declare destination
case "${TARGET}" in
"${WWW_DEPLOY_ROOT_DEVELOP}")
destination="${TARGET}/${CI_BUILD_REF_NAME}"
;;
"${WWW_DEPLOY_ROOT_STAGING}"|"${WWW_DEPLOY_ROOT_PRODUCTION}")
destination="${TARGET}"
;;
*)
echo "Invalid TARGET specified. Aborting deployment."
exit 1
;;
esac
if [[ ! -d "${destination}" ]] ; then
mkdir -p "${destination}" || echo "Failed to create target directory for deployment!"
fi
echo "Before any deletion:"
ls "${destination}"
2016-08-15 20:28:23 +02:00
rm -rf "${destination}/*"
echo "After rm -rf dest/*:"
ls "${destination}"
2016-08-15 20:28:23 +02:00
rm -rf "${destination}/.??*"
echo "After rm -rf dest/.??:"
ls "${destination}"
cp -a dencode.css index.html package.json systemjs.config.js "${destination}"
2016-09-15 22:14:17 +02:00
mkdir -p "${destination}/app"
cp -a app/*.css app/*.html app/*.js app/*.js.map "${destination}/app"
2016-09-15 22:14:17 +02:00
mkdir -p "${destination}/node_modules/core-js/client" "${destination}node_modules/zone.js/dist" "${destination}/node_modules/reflect-metadata" "${destination}/node_modules/systemjs/dist"
cp -a node_modules/core-js/client/shim.js "${destination}/node_modules/core-js/client/"
cp -a node_modules/zone.js/dist/zone.js "${destination}/node_modules/zone.js/dist/"
cp -a node_modules/reflect-metadata/Reflect.js "${destination}/node_modules/reflect-metadata/"
cp -a node_modules/systemjs/dist/system.src.js "${destination}/node_modules/systemjs/dist/"
2016-08-15 20:28:23 +02:00
echo "Deployment successful."