uhr/deploy.sh

24 lines
533 B
Bash
Raw Normal View History

#!/bin/sh
declare destination
2016-06-27 00:58:36 +02:00
case "${TARGET}" in
"${WWW_DEPLOY_ROOT_DEVELOP}")
destination="${TARGET}/${CI_BUILD_REF_NAME}"
2016-06-27 00:58:36 +02:00
;;
"${WWW_DEPLOY_ROOT_STAGING}"|"${WWW_DEPLOY_ROOT_PRODUCTION}")
destination="${TARGET}"
2016-06-27 00:58:36 +02:00
;;
*)
echo "Invalid TARGET specified. Aborting deployment."
exit 1
2016-06-27 00:58:36 +02:00
;;
esac
rm -rf "${destination}/*"
rm -rf "${destination}/.??*"
mkdir -p "${destination}/dist"
cp -a index.html manifest.appcache info resources "${destination}"
cp -a dist/*.min.* "${destination}/dist"
echo "Deployment successful."