Compare commits

..

No commits in common. "512b9c9c91a142cb08613d898f1daecafa6d639f" and "ce7e2593f40ba9db71412ea30b87e51a8cfcda43" have entirely different histories.

View File

@ -1,33 +1,27 @@
#/usr/bin/env bash
set -e
# Check if the source server variable has already been set externally
if [ -z "${DEPLOY_SOURCE}" ]; then
# Check for the source server (with default)
DEPLOY_SOURCE_FILE="${HOME}/.deploy_source"
DEPLOY_SOURCE="https://git.bjphoster.com/deployments"
if [ -f "${DEPLOY_SOURCE_FILE}" ]; then
. "${DEPLOY_SOURCE_FILE}"
fi
fi
# Check if the deploy position variable has already been set externally
if [ -z "${DEPLOY_DESTINATION}" ]; then
# Check for the deploy position (with default)
DEPLOY_DESTINATION_FILE="${HOME}/.deploy_destination"
DEPLOY_DESTINATION="/opt"
if [ -f "${DEPLOY_DESTINATION_FILE}" ]; then
. "${DEPLOY_DESTINATION_FILE}"
fi
fi
# Check if the correct usage is respected
if [ $# -lt 2 ]; then
echo "Usage: $0 <service> <service name> [branch/tag]"
echo
echo "Current settings:"
echo "- \$DEPLOY_SOURCE · ${DEPLOY_SOURCE}"
echo "- \$DEPLOY_DESTINATION · ${DEPLOY_DESTINATION}"
echo "- Source · ${DEPLOY_SOURCE}"
echo "- Destination · ${DEPLOY_DESTINATION}"
exit
fi