Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Specify config filename #2

Closed
wants to merge 34 commits into
from

Conversation

Projects
None yet
9 participants

joelvh commented May 14, 2012

Specify the filename to save environment variables to with the --filename option.

+1, was looking for this feature myself

jalada commented Jul 27, 2012

+1 could really do with this for managing multiple .env files (e.g. .env for dev and .env_production for production)

joelvh commented Sep 12, 2012

Updated to use heroku-api

xentek commented Apr 12, 2013

👍

@xentek xentek commented on the diff Apr 12, 2013

lib/config/heroku/command/config.rb
require "heroku/command/config"
-class Heroku::Command::Config
+class Heroku::Command::Config < Heroku::Command::Base
# config:pull
#
@xentek

xentek Apr 12, 2013

You might want to update the comments here with the new --filename option

@xentek xentek commented on the diff Apr 12, 2013

lib/config/heroku/command/config.rb
@@ -35,14 +36,20 @@ def push
@xentek

xentek Apr 12, 2013

You might want to update the comments here, too, with the new --filename option

@xentek xentek commented on an outdated diff Apr 12, 2013

init.rb
@@ -1 +1,6 @@
require "config/heroku/command/config"
+
+if Heroku::VERSION >= "2.0"
+ # specify a specific filename to use
+ Heroku::Command.global_option :filename, "--filename FILENAME"
@xentek

xentek Apr 12, 2013

This doesn't seem to add the --filename option to the output of heroku help config:pull

xentek commented May 7, 2013

Just a heads up: when using this branch, config:pull --filename doesn't seem to overwrite an existing file. To get a new config I had to remove the file manually and then re-run it.

I didn't check the file itself (probably should have), but I assumed it either didn't write to the file because it existed or appended to it.

@joelvh joelvh closed this Aug 25, 2013

kcolton commented Oct 1, 2013

Submitted a pull request which adds a very simple --env arg which lets you specify env filename for pushing and pulling and mirrors foreman's arg for nice symmetry.

#11

Would be great to have handling similar to Foreman and Dotenv (which it uses) So that if a production-specific env file exists; .env.staging etc, it is also loaded/pushed.

Is there any reason why this PR was closed or this one #11 ? @ddollar is this something you don't want in heroku-config? This feature would be arguably necessary to manage large environment configuration sets for multiple environments where source control is needed for audit purposes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment