Looks cool, thanks. I ended up doing kind of the same thing, having a config.xml template and this gulp task:
var app = require('package.json');
gulp.task('set-config', function (done) {
var appName = capitalize(app.name), appBundleId = app.bundleId, appVersion = app.version;
if (configName === 'development') {
appName += ' DEVEL';
appBundleId += '.devel';
}
sh.exec("sed -r -e 's/@@APP_NAME@@/" + appName + "/' -e 's/@@APP_BUNDLE_ID@@/" + appBundleId + "/' -e 's/@@APP_VERSION@@/" + appVersion + "/' config.xml.tpl > config.xml", done);
});
It previously didn’t work because I was doing this in a before_prepare hooks which happens to be executed too late in the process for config.xml hacks.