Skip to content

Commit

Permalink
CB-9185 Fixed an issue when unsigned apks couldn't be found. This closes
Browse files Browse the repository at this point in the history
  • Loading branch information
alsorokin authored and nikhilkh committed Jul 22, 2015
1 parent d99a21e commit 8983ddb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bin/templates/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,27 +74,28 @@ function findOutputApksHelper(dir, build_type, arch) {
return /-debug/.exec(candidate) && !/-unaligned|-unsigned/.exec(candidate);
}
if (build_type === 'release') {
return /-release/.exec(candidate) && !/-unaligned|-unsigned/.exec(candidate);
return /-release/.exec(candidate) && !/-unaligned/.exec(candidate);
}
return true;
});
ret = sortFilesByDate(ret);
if (ret.length === 0) {
return ret;
}
// Assume arch-specific build if newest api has -x86 or -arm.
// Assume arch-specific build if newest apk has -x86 or -arm.
var archSpecific = !!/-x86|-arm/.exec(ret[0]);
// And show only arch-specific ones (or non-arch-specific)
ret = ret.filter(function(p) {
/*jshint -W018 */
return !!/-x86|-arm/.exec(p) == archSpecific;
/*jshint +W018 */
});
if (arch && ret.length > 1) {
if (archSpecific && ret.length > 1) {
ret = ret.filter(function(p) {
return p.indexOf('-' + arch) != -1;
});
}

return ret;
}

Expand Down

0 comments on commit 8983ddb

Please sign in to comment.