Skip to content

Instantly share code, notes, and snippets.

@tohagan
Last active November 27, 2021 04:45
Show Gist options
  • Save tohagan/c65382c7638b5f16b81555f8283b6530 to your computer and use it in GitHub Desktop.
Save tohagan/c65382c7638b5f16b81555f8283b6530 to your computer and use it in GitHub Desktop.
Read .env format file from stdtin and sets environment on Heroku app
#!/bin/bash
#
# Read .env format file from stdtin and sets environment on Heroku app
# Usage:
# $ grep '^SOME_PREFIX' .env.production | herokuconfig.sh | sh -x
#
sed -e '/^#/d' -e '/^$/d' -e 's/^/heroku config:set /'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment