2016-06-26 22:20:30 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-06-27 00:51:56 +02:00
|
|
|
echo "Target: ${ENVIRON}"
|
2016-06-27 00:23:08 +02:00
|
|
|
if [ "develop" == "${ENVIRON}" ] ; then
|
|
|
|
echo "Deploying ${CI_BUILD_REF_NAME} to develop. You can access it at .../${CI_BUILD_REF_NAME}"
|
|
|
|
target="${WWW_DEPLOY_ROOT_DEVELOP}/${CI_BUILD_REF_NAME}"
|
2016-06-27 00:51:56 +02:00
|
|
|
rm -rf "${target}"
|
|
|
|
mkdir -p "${target}/dist"
|
2016-06-27 00:28:31 +02:00
|
|
|
cp -a index.html manifest.appcache info resources "${target}"
|
|
|
|
cp -a dist/*.min.* "${target}/dist"
|
2016-06-27 00:23:08 +02:00
|
|
|
else
|
|
|
|
echo "Automatic deployment to ${ENVIRON} is not yet implemented."
|
|
|
|
fi
|
2016-06-27 00:51:56 +02:00
|
|
|
|
|
|
|
if [ "${WWW_DEPLOY_ROOT_DEVELOP}" == "${TARGET}" ] ; then
|
|
|
|
echo "Deployment to develop requested"
|
|
|
|
elif [ "${WWW_DEPLOY_ROOT_STAGING}" == "${TARGET}" ] ; then
|
|
|
|
echo "Deployment to staging requested"
|
|
|
|
elif [ "${WWW_DEPLOY_ROOT_PRODUCTION}" == "${TARGET}" ] ; then
|
|
|
|
echo "Deployment to PRODUCTION requested"
|
|
|
|
else
|
|
|
|
echo "Unknown environment: ${TARGET}"
|
|
|
|
fi
|