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

Add version in more places in config.xml #377

Open
jfoclpf opened this issue Mar 21, 2021 · 4 comments
Open

Add version in more places in config.xml #377

jfoclpf opened this issue Mar 21, 2021 · 4 comments

Comments

@jfoclpf
Copy link

jfoclpf commented Mar 21, 2021

First of all, great package, thanks, very useful. I have this as dependency in all my Cordova projects.

Though I realised I needed to insert the version number in more places in config.xml

What do you think of an extra option of simply replacing the string {{cordova-set-version}} by the version?

The script would read the config.xml in plain text and just replace.

@jfoclpf
Copy link
Author

jfoclpf commented Mar 21, 2021

If you agree with the concept, I try to do a PR

@jfoclpf
Copy link
Author

jfoclpf commented Mar 22, 2021

Hi @gligoran , to play on the safe side, note that the characters { and } are perfectly allowed in XML attributes.

Thus one could have for example in config.xml:

<preference name="OverrideUserAgent" value="APP/com.my.android.app v.{{cordova-set-version}}"/>

What do you think?

@gligoran
Copy link
Owner

Hi, thank you for the suggestion. Sadly, I currently can't find the time to research this approach, but It's definitely an interesting idea. In the little spare time I can find I'm still working on making the tests a lot more adjustable so they don't need to be rewritten with every bigger change.

@jfoclpf
Copy link
Author

jfoclpf commented Mar 30, 2021

I can make that upgrade via a PR. But I wanted to know your opinion beforehand, otherwise you wouldn't approve it :)

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

No branches or pull requests

2 participants