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

[TIMOB-24453] iOS: Include TI_MODULE_VERSION in generated module.xcconfig, etc. #8861

Merged
merged 2 commits into from
Apr 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions iphone/cli/commands/_buildModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ iOSModuleBuilder.prototype.compileJS = function compileJS(next) {
cb();
},

// 4. genereate exports
// 4. generate exports
function (cb) {
this.jsFilesToEncrypt.forEach(function(file) {
var r = jsanalyze.analyzeJsFile(file, { minify: true });
Expand Down Expand Up @@ -634,12 +634,20 @@ iOSModuleBuilder.prototype.packageModule = function packageModule() {
// 7. the merge *.a file
// 8. LICENSE file
// 9. manifest
// 10. module.xcconfig
// 11. metadata.json
dest.append(fs.createReadStream(binarylibFile), { name: path.join(moduleFolders, binarylibName) });
dest.append(fs.createReadStream(this.licenseFile), { name: path.join(moduleFolders,'LICENSE') });
dest.append(fs.createReadStream(this.manifestFile), { name: path.join(moduleFolders,'manifest') });
dest.append(fs.createReadStream(this.moduleXcconfigFile), { name: path.join(moduleFolders,'module.xcconfig') });

// 10. module.xcconfig
if (fs.existsSync(this.moduleXcconfigFile)) {
var contents = fs.readFileSync(this.moduleXcconfigFile).toString();

contents = '// This flag is generated by the module build, do not change it.\nTI_MODULE_VERSION=' + this.moduleVersion + '\n\n' + contents;

dest.append(contents, { name: path.join(moduleFolders,'module.xcconfig') });
}

// 11. metadata.json
dest.append(fs.createReadStream(this.metaDataFile), { name: path.join(moduleFolders,'metadata.json') });

this.logger.info(__('Writing module zip: %s', moduleZipFullPath));
Expand Down