Reputation: 301
I have my qooxdoo project built and deployed by a CI server. Upon build, the server generates build info (version, VCS revision, CI build number, timestamp) that I would like to be passed to my qooxdoo app as qx.core.Environment
keys.
At the moment, I have CI server generate a build.json
file which is packaged together with the application, loaded at startup and converted to environment keys (by application code). This costs us an extra XHR.
On the other hand, I know that environment entries can be supplied during build, via config.json
. Of course our build system can preprocess config.json
to fill in environment entries, but I'm a bit skeptic of the idea of CI server fiddling with config.json
. Is there any better solution? Is it possible to make generator script read environment entries from some auxiliary source?
Upvotes: 0
Views: 65
Reputation: 5460
I would write a #VERSION# tag into my script and at the end of the build process just search and replace this string in the compiled js file.
perl -i -p -e 's/#VERSION#/0.3.0/g' build/script/hello.js
Upvotes: 0