22 lines
479 B
Bash
22 lines
479 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}/.??*"
|
||
|
cp -a dencode.css dencode.js index.html quoted-printable.js utf8.js "${destination}"
|
||
|
|
||
|
echo "Deployment successful."
|