23 lines
533 B
Bash
23 lines
533 B
Bash
#!/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
|
|
|
|
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."
|