Sanjeev Yadav
To give you an example, here are some parts of our “rofx-xcode” build script
Dream:Source mh$ train DataAbstract.train
RemObjects Train - JavaScript-based build automation
Copyright (c) RemObjects Software, 2012. All rights reserved.
script(da.train) {
function buildDAProject(Data Abstract for OS X, macosx) {
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
} function buildDAProject
function buildDAProject(Data Abstract for iOS, iphoneos) {
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { ...
To give you an example, here are some parts of our “rofx-xcode” build script
include("$(Train)/ci2.train"); // Shared stuff specific to RemObjects' CI2
var versionNumber = ci2_GetVersionNumberFromGlobalIni("ROFX");
var sharedRofxWin = ci2_FindClosestSharedFolder("rofx-win"); // find closest/latest "rofx-win" build to copy stuff from
export("CIVersionNumber", versionNumber);
log("sharedRofxWin is in "+sharedRofxWin);
//...
run("Source/RemObjectsSDK.train");
run("Source/DataAbstract.train");
run("Source/TwinPeaks.train");
function buildTrial(_project, _targetBase, _sdk)
{
xcode.rebuild(_project, { configuration: "Trial", target: _targetBase+" for OS X", sdk: "macosx", destinationFolder: "./Bin" });
xcode.rebuild(_project, { configuration: "Trial", target: _targetBase+" for iOS", sdk: "iphoneos", destinationFolder: "./Bin/iOS" });
xcode.rebuild(_project, { configuration: "Trial", target: _targetBase+" for iOS", sdk: "iphonesimulator", destinationFolder: "./Bin/iOS" });
}
buildTrial("Source/RemObjectsSDK/RemObjectsSDK.xcodeproj", "RemObjects SDK");
buildTrial("Source/DataAbstract/DataAbstract.xcodeproj", "Data Abstract");
// ...
xcode.rebuild("Tools/DASchemaModeler/DASchemaModeler.xcodeproj", { configuration: "Release", destinationFolder: "./Bin" });
xcode.rebuild("Tools/DASchemaModeler/DASchemaModeler.xcodeproj", { configuration: "AppStore", destinationFolder: "./Bin" });
// ...
file.copy("Release/*", env["CIReleaseFolder"]);
Among other things, you see this script calls run() on “DataAbstract.train”, which is a subscript that we actually ship with the product, so customers can run it standalone if they want to rebuild DA from source. The console output of “DataAbtract.train” while it is running might look something like this:
Dream:Source mh$ train DataAbstract.train
RemObjects Train - JavaScript-based build automation
Copyright (c) RemObjects Software, 2012. All rights reserved.
script(da.train) {
function buildDAProject(Data Abstract for OS X, macosx) {
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
} function buildDAProject
function buildDAProject(Data Abstract for iOS, iphoneos) {
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { }
xcode.rebuild(DataAbstract/DataAbstract.xcodeproj, [object Object]) { ...
No comments:
Post a Comment