Skip to content

Commit

Permalink
Merge branch 'master' into TIMOB-25678
Browse files Browse the repository at this point in the history
  • Loading branch information
garymathews committed Oct 18, 2018
2 parents 27b0418 + 86ed0be commit cc3a7b1
Show file tree
Hide file tree
Showing 8 changed files with 595 additions and 260 deletions.
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def unitTests(os, nodeVersion, npmVersion, testSuiteBranch) {
if ('ios'.equals(os)) {
// Gather the crash report(s)
def home = sh(returnStdout: true, script: 'printenv HOME').trim()
// wait 1 minute, sometimes it's delayed in writing out crash reports to disk...
sleep time: 1, unit: 'MINUTES'
def crashFiles = sh(returnStdout: true, script: "ls -1 ${home}/Library/Logs/DiagnosticReports/").trim().readLines()
for (int i = 0; i < crashFiles.size(); i++) {
def crashFile = crashFiles[i]
Expand Down Expand Up @@ -460,7 +462,7 @@ timestamps {
withEnv(['ghprbGhRepository=appcelerator/titanium_mobile',"ghprbPullId=${env.CHANGE_ID}", "ZIPFILE=${basename}-osx.zip", "BUILD_STATUS=${currentBuild.currentResult}"]) {
// FIXME Can't pass along env variables properly, so we cheat and write them as a JSON file we can require
sh 'node -p \'JSON.stringify(process.env)\' > env.json'
sh returnStatus: true, script: 'npx danger' // Don't fail build if danger fails. We want to retain existing build status.
sh returnStatus: true, script: 'npx danger ci' // Don't fail build if danger fails. We want to retain existing build status.
} // withEnv
} // nodejs
deleteDir()
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ see the LICENSE file for specific details.
*[Download Pre-built Titanium](http://builds.appcelerator.com/#master)*

# Table of Contents

[![Greenkeeper badge](https://badges.greenkeeper.io/appcelerator/titanium_mobile.svg)](https://greenkeeper.io/)

1. [Features](#features)
2. [Hyperloop](#hyperloop)
3. [Alloy](#alloy)
Expand Down
2 changes: 1 addition & 1 deletion build/android.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Android.prototype.package = function (packager, next) {
// Copy over module resources
function (cb) {
const filterRegExp = new RegExp('\\' + path.sep + 'android(\\' + path.sep + 'titanium-(.+)?.(jar|res.zip|respackage))?$'); // eslint-disable-line security/detect-non-literal-regexp
fs.copy(DIST_ANDROID, ANDROID_MODULES, { filter: filterRegExp }, cb);
fs.copy(DIST_ANDROID, ANDROID_MODULES, { filter: src => filterRegExp.test(src) }, cb);
}
], next);
};
Expand Down
16 changes: 16 additions & 0 deletions greenkeeper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"groups": {
"default": {
"packages": [
"android/package.json",
"iphone/package.json",
"package.json"
]
},
"templates": {
"packages": [
"templates/app/angular-default/template/app/package.json"
]
}
}
}
15 changes: 11 additions & 4 deletions iphone/cli/commands/_build.js
Original file line number Diff line number Diff line change
Expand Up @@ -2553,10 +2553,15 @@ iOSBuilder.prototype.determineLogServerPort = function determineLogServerPort(ne

let client = null;

function die() {
function die(error) {
client && client.destroy();
_t.logger.error(__('Another process is currently bound to port %d', _t.tiLogServerPort));
_t.logger.error(__('Set a unique <log-server-port> between 1024 and 65535 in the <ios> section of the tiapp.xml') + '\n');
if (error.code === 'ENOTFOUND') {
_t.logger.error(__('Unable to connect to log server on localhost'));
_t.logger.error(__('Please ensure your /etc/hosts file contains a valid entry for `localhost`'));
} else {
_t.logger.error(__('Another process is currently bound to port %d', _t.tiLogServerPort));
_t.logger.error(__('Set a unique <log-server-port> between 1024 and 65535 in the <ios> section of the tiapp.xml') + '\n');
}
process.exit(1);
}

Expand All @@ -2567,6 +2572,8 @@ iOSBuilder.prototype.determineLogServerPort = function determineLogServerPort(ne
// then we will fail out
// - if the port is bound by another process that expects data before the
// response is returned, then we will just timeout and fail out
// - if localhost cannot be resolved then we will fail out and inform
// the user of that
client = net.connect({
host: 'localhost',
port: _t.tiLogServerPort,
Expand All @@ -2584,7 +2591,7 @@ iOSBuilder.prototype.determineLogServerPort = function determineLogServerPort(ne
process.exit(1);
}
} catch (e) {
die();
die(e);
}
_t.logger.debug(__('The log server port is being used by the app being built, continuing'));
next();
Expand Down

0 comments on commit cc3a7b1

Please sign in to comment.