Skip to content

Instantly share code, notes, and snippets.

@borgeslucaz borgeslucaz/deploy.sh
Last active Dec 3, 2019

Embed
What would you like to do?
#!/bin/sh
APP_URL="abcdef.com.br"
ROOT_PATH="/srv/${APP_URL}/www/"
RELEASES="${ROOT_PATH}/releases"
CURRENT="${ROOT_PATH}/current"
GIT_URL="https://github.com/borgeslucaz/modern-go-application.git"
NEW_RELEASE=$(date +%s)
NEW_RELEASE_PATH="${ROOT_PATH}/releases/${NEW_RELEASE}"
# Create new release
echo "Creating new release"
mkdir -p $NEW_RELEASE_PATH
echo "Cloning repo"
git clone $GIT_URL $NEW_RELEASE_PATH
#ls -1tr | head -n -10 | xargs -d '\n' rm -f --
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.