Skip to content
This repository has been archived by the owner on Jul 8, 2020. It is now read-only.

get/set version of project with jenkins #214

Closed
MathiasTim opened this issue Jul 21, 2015 · 4 comments
Closed

get/set version of project with jenkins #214

MathiasTim opened this issue Jul 21, 2015 · 4 comments

Comments

@MathiasTim
Copy link
Contributor

  • TBD
  • Discussion
@gruppjo
Copy link
Contributor

gruppjo commented Aug 20, 2015

gulp config --getVersion
returns 0.0.1
when config.xml looks like this:

<widget id="com.company.project" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">

@MathiasTim
Copy link
Contributor Author

What we should do on jenkins it something like this:

OUTPUT="$(gulp config --getVersion)"
gulp --cordova 'prepare ios' --buildVars=${OUTPUT}

I tested it with this command

OUTPUT="$(echo 'version:1.0.0')"
gulp --cordova 'prepare ios' --buildVars=${OUTPUT}

And it worked :) only problem was, I had to add 'version:' to the output because everything inside the quotes in --buildVars="" was not interpreted as variable. But maybe there is a way around that one as well

@MathiasTim
Copy link
Contributor Author

Maybe this is more related to #183 as we thought.

Because jenkins has to manipulate the android-versionCode right now.
With this method we can only get the version="0.0.1"

gruppjo added a commit that referenced this issue Aug 27, 2015
@gruppjo
Copy link
Contributor

gruppjo commented Aug 27, 2015

@MathiasTim, I was having some thoughts about this issue and I took the liberty to revamp the gulp config task. I think it's much more flexible now and you'll be able to perform all the necessary tasks easily.

All documented here: https://github.com/mwaylabs/generator-m/blob/master/docs/guides/programmatically_change_configxml.md

Feedback please :)

@gruppjo gruppjo closed this as completed Aug 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants