From: elijah Date: Mon, 10 Feb 2014 08:22:34 +0000 (-0800) Subject: automatically upgrade secrets.json X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=b89b8b532e992eed0b61fae7a42ee3bee064d30e;p=leap%2Fleap_cli.git automatically upgrade secrets.json --- diff --git a/lib/leap_cli/config/manager.rb b/lib/leap_cli/config/manager.rb index 90c4db0..d6cb89e 100644 --- a/lib/leap_cli/config/manager.rb +++ b/lib/leap_cli/config/manager.rb @@ -61,6 +61,14 @@ module LeapCli @provider = load_json(provider_path, Config::Object) @secrets = load_json(Path.named_path(:secrets_config, @provider_dir), Config::Secrets) + ### BEGIN HACK + ### remove this after it is likely that no one has any old-style secrets.json + if @secrets['webapp_secret_token'] + @secrets = Config::Secrets.new + Util::log :warning, "Creating all new secrets.json (new version is scoped by environment). Make sure to do a full deploy so that new secrets take effect." + end + ### END HACK + # inherit @services.inherit_from! base_services @tags.inherit_from! base_tags