Skip to content

Instantly share code, notes, and snippets.

@marcuswestin
Created February 9, 2013 01:34
Show Gist options
  • Save marcuswestin/4743415 to your computer and use it in GitHub Desktop.
Save marcuswestin/4743415 to your computer and use it in GitHub Desktop.
Short makefile commands to keep dev and prod secrets encrypted in your repo.
# Assumes a folder "secrets/" with "dev/" and "prod/" inside it
# Also, make sure "secrets/dev" and "secrets/prod" are in your .gitignore file.
# But do add secrets/prod.tar.bfe and secrets/dev.tar.bfe to your repo
run-dev: secrets/dev
echo "Run dev with secrets/dev/*"
run-prod: secrets/prod
echo "Run prod with secrets/prod/*"
secrets/dev:
bcrypt -r secrets/dev.tar.bfe
tar -xf secrets/dev.tar
rm secrets/dev.tar
secrets/prod:
bcrypt -r secrets/prod.tar.bfe
tar -xf secrets/prod.tar
rm secrets/prod.tar
encrypt-prod:
tar -cf secrets/prod.tar secrets/prod
bcrypt secrets/prod.tar
encrypt-dev:
tar -cf secrets/dev.tar secrets/dev
bcrypt secrets/dev.tar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment