mirror of
https://github.com/appium/appium.git
synced 2026-04-28 14:30:27 -05:00
Added SafariLauncher as a submodule and as part of the build. App is then zipped and copied to the build folder.
This commit is contained in:
@@ -22,3 +22,6 @@
|
||||
[submodule "submodules/unlock_apk"]
|
||||
path = submodules/unlock_apk
|
||||
url = https://github.com/appium/unlock_apk.git
|
||||
[submodule "submodules/SafariLauncher"]
|
||||
path = submodules/SafariLauncher
|
||||
url = https://github.com/budhash/SafariLauncher.git
|
||||
|
||||
@@ -5,6 +5,7 @@ var path = require('path')
|
||||
, authorize = gruntHelpers.authorize
|
||||
, tail = gruntHelpers.tail
|
||||
, buildApp = gruntHelpers.buildApp
|
||||
, buildSafariLauncherApp = gruntHelpers.buildSafariLauncherApp
|
||||
, signApp = gruntHelpers.signApp
|
||||
, setupAndroidBootstrap = gruntHelpers.setupAndroidBootstrap
|
||||
, setupAndroidApp = gruntHelpers.setupAndroidApp
|
||||
@@ -107,6 +108,9 @@ module.exports = function(grunt) {
|
||||
grunt.registerTask('buildApp', "Build the test app", function(appDir, sdk) {
|
||||
buildApp(appDir, this.async(), sdk);
|
||||
});
|
||||
grunt.registerTask('buildSafariLauncherApp', "Build the SafariLauncher app", function(sdk) {
|
||||
buildSafariLauncherApp(this.async(), sdk);
|
||||
});
|
||||
grunt.registerTask('signApp', "Sign the test app", function(certName) {
|
||||
signApp("TestApp", certName, this.async());
|
||||
});
|
||||
|
||||
+14
-1
@@ -247,7 +247,7 @@ module.exports.build = function(appRoot, cb, sdk) {
|
||||
return cb(stdout + "\n" + stderr);
|
||||
}
|
||||
console.log("Building app...");
|
||||
var args = ['-sdk', sdk, '-arch', 'i386'];
|
||||
var args = ['-sdk', sdk];
|
||||
xcode = spawn('xcodebuild', args, {
|
||||
cwd: appRoot
|
||||
});
|
||||
@@ -303,6 +303,19 @@ module.exports.signApp = function(appName, certName, cb) {
|
||||
});
|
||||
};
|
||||
|
||||
module.exports.buildSafariLauncherApp = function(cb, sdk) {
|
||||
var appRoot = path.resolve(__dirname, "submodules", "SafariLauncher");
|
||||
module.exports.build(appRoot, function(err) {
|
||||
if (err !== null) {
|
||||
console.log(err);
|
||||
cb(false);
|
||||
} else {
|
||||
cb(true);
|
||||
}
|
||||
}, sdk);
|
||||
};
|
||||
|
||||
|
||||
var setupAndroidProj = function(grunt, projPath, args, cb) {
|
||||
if (!process.env.ANDROID_HOME) {
|
||||
grunt.fatal("Could not find Android SDK, make sure to export ANDROID_HOME");
|
||||
|
||||
@@ -128,10 +128,17 @@ reset_ios() {
|
||||
run_cmd pushd $appium_home/submodules/fruitstrap/
|
||||
run_cmd make fruitstrap
|
||||
run_cmd popd
|
||||
echo "* Copying fruitstrap to build/"
|
||||
echo "* Copying fruitstrap to build"
|
||||
run_cmd rm -rf build/fruitstrap
|
||||
run_cmd mkdir -p build/fruitstrap
|
||||
run_cmd cp submodules/fruitstrap/fruitstrap build/fruitstrap
|
||||
echo "* Building SafariLauncher"
|
||||
run_cmd $grunt buildSafariLauncherApp:iphoneos
|
||||
echo "* Copying SafariLauncher to build"
|
||||
run_cmd zip -r submodules/SafariLauncher/SafariLauncher submodules/SafariLauncher/build/Release-iphoneos/SafariLauncher.app
|
||||
run_cmd mkdir -p build/SafariLauncher
|
||||
run_cmd cp submodules/SafariLauncher/SafariLauncher.zip build/SafariLauncher/
|
||||
|
||||
}
|
||||
|
||||
get_apidemos() {
|
||||
|
||||
Submodule
+1
Submodule submodules/SafariLauncher added at 1baa8d3097
Reference in New Issue
Block a user