Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow overriding custom values in config.xml #1

Closed
slorber opened this issue Jun 2, 2016 · 2 comments
Closed

Allow overriding custom values in config.xml #1

slorber opened this issue Jun 2, 2016 · 2 comments

Comments

@slorber
Copy link

slorber commented Jun 2, 2016

Hi,

As far as I understand it, your project seems to permit to easily customize the config.xml according to some env variables. I'd like to use that to create different config.xml files according to the release context (dev/staging/prod)

But I have preferences that have to vary per env. Is it possible to configure the values based on some env variable?

    <preference name="intercom-app-id" value="f91b67651d379de0exxx1d3452d94ab6"/>
    <preference name="intercom-ios-api-key" value="ios_sdk-d9bab7918bc78823fxxxxxee885965"/>
    <preference name="intercom-android-api-key" value="android_sdk-2a841db307c589becddxxx5bd9065a9a153e"/>

Also, instead of using env variables, wouldn't it be great to have a json with all the things we want to override?

@dpogue
Copy link
Owner

dpogue commented Jun 3, 2016

The reason I went with environment variables is that they're easy to specify in almost all continuous integration systems like Travis, Jenkins, and Appveyor. The downside of a JSON file is that you either need to check that file into your project, or you end up trying to inject or fetch it from somewhere as part of your build process.

Overriding preferences is a use case I've run into, but don't have a great solution for. Something like SEY_PREFERENCE_${preference_name} might work, but there's the more complex case where you have different preference values for different platforms.
I'll give it some more thought and try to come up with something that works for the majority of cases.

@slorber
Copy link
Author

slorber commented Jun 3, 2016

@dpogue SEY_PREFERENCE_${preference_name} would be ok for me :)

I understand why you need env variables in some case as it gives you greater flexibility.
It would however be great to also be able to provide as environment variable a json file path so that Seymour use it. It would be helpful for those like me who have predefined environments.
Like SEY_CONFIG=sey.production.json, but still giving the opportunity to override the json config by env variables to not loose flexibility you need.

but there's the more complex case where you have different preference values for different platforms.

It's the case for CodePush that recommends using a different key for iOS/Android. So you have a Staging/Prod + iOS/Android = 4 possible keys for a single app that you might want to use.

@dpogue dpogue closed this as completed in df955f6 Oct 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants