ci: use Diawi URL for iOS only if it's set

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-01-21 09:16:31 +01:00
parent 5e6ab5d0d9
commit 72823c2c3e
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
3 changed files with 3 additions and 2 deletions

View File

@ -11,7 +11,7 @@ utils = load 'ci/utils.groovy'
def buildObj(success) { def buildObj(success) {
def pkg_url = env.PKG_URL def pkg_url = env.PKG_URL
/* a bare ipa file is not installable on iOS */ /* a bare ipa file is not installable on iOS */
if (env.TARGET == 'ios') { if (env.TARGET == 'ios' && env.DIAWI_URL != "") {
pkg_url = env.DIAWI_URL pkg_url = env.DIAWI_URL
} }
/* assemble build object valid for ghcmgr */ /* assemble build object valid for ghcmgr */

View File

@ -185,7 +185,7 @@ def publishReleaseMobile(path='pkg') {
def found = findFiles(glob: "${path}/*") def found = findFiles(glob: "${path}/*")
if (found.size() == 0) { if (found.size() == 0) {
sh "ls ${path}" sh "ls ${path}"
error("No file to release in ${path}") error("No file to release in ${path}")
} }
publishRelease( publishRelease(
version: ghcmgr.utils.getVersion(), version: ghcmgr.utils.getVersion(),

View File

@ -63,6 +63,7 @@ def uploadToDiawi() {
withCredentials([ withCredentials([
string(credentialsId: 'diawi-token', variable: 'DIAWI_TOKEN'), string(credentialsId: 'diawi-token', variable: 'DIAWI_TOKEN'),
]) { ]) {
/* This can silently fail with 'File is not processed.' */
nix.shell( nix.shell(
'bundle exec --gemfile=fastlane/Gemfile fastlane ios upload_diawi', 'bundle exec --gemfile=fastlane/Gemfile fastlane ios upload_diawi',
keep: ['FASTLANE_DISABLE_COLORS', 'DIAWI_TOKEN'], keep: ['FASTLANE_DISABLE_COLORS', 'DIAWI_TOKEN'],