Skip to content

Instantly share code, notes, and snippets.

@tristanbes
Forked from danharper83/snapshot.sh
Created August 29, 2017 10:04
Show Gist options
  • Save tristanbes/89737a3edab60f16212a55fdfc1e7dc0 to your computer and use it in GitHub Desktop.
Save tristanbes/89737a3edab60f16212a55fdfc1e7dc0 to your computer and use it in GitHub Desktop.
Creates a snapshot on platform using platform commands
#!/usr/bin/env bash
ORIGIN="develop"
TARGET="master"
if [ "$PLATFORM_BRANCH" = "$ORIGIN" ]; then
/app/.platformsh/bin/platform self-update -y -q
/app/.platformsh/bin/platform backup -y -q -p $PLATFORM_PROJECT -e $TARGET
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment