Skip to content

Instantly share code, notes, and snippets.

@bruno-brant
Created May 26, 2021 17:43
Show Gist options
  • Save bruno-brant/ac4091e355cab84dace5e4e98670a555 to your computer and use it in GitHub Desktop.
Save bruno-brant/ac4091e355cab84dace5e4e98670a555 to your computer and use it in GitHub Desktop.
Heroku CLI Tips

Tips for Heroku CLI

Copy all variables

Copies all variables from "$source" app to "$target" app.

$source = "";
$target = "";
heroku config -a $source | where { -not $_.StartsWith("===") } | %{ $kv = -split $_; $key = $kv[0].Replace(":", ""); $value = $kv[1]; heroku config:set -a $target "$key=$value" }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment