Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions packages/@ionic/cli/src/commands/deploy/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ export class BuildCommand extends Command {
groups: [MetadataGroup.PAID],
summary: 'Create a deploy build on Appflow',
description: `
This command creates a deploy build on Ionic Appflow. While the build is running, it prints the remote build log to the terminal. If the build is successful, it downloads the created web build zip file in the current directory.
This command creates a deploy build on Ionic Appflow. While the build is running, it prints the remote build log to the terminal. If the build is successful, it downloads the created web build zip file in the current directory. Downloading build artifacts can be skipped by supplying the flag ${input('skip-download')}.

Apart from ${input('--commit')}, every option can be specified using the full name setup within the Appflow Dashboard[^dashboard].

Customizing the build:
- The ${input('--environment')} and ${input('--channel')} options can be used to customize the groups of values exposed to the build.

Apart from ${input('--commit')}, every option can be specified using the full name setup within the Appflow Dashboard[^dashboard].
`,
footnotes: [
{
Expand All @@ -66,6 +66,7 @@ Apart from ${input('--commit')}, every option can be specified using the full na
'--environment="My Custom Environment Name"',
'--commit=2345cd3305a1cf94de34e93b73a932f25baac77c',
'--channel="Master"',
'--channel="Master" --skip-download',
'--channel="Master" --channel="My Custom Channel"',
],
options: [
Expand All @@ -88,6 +89,13 @@ Apart from ${input('--commit')}, every option can be specified using the full na
groups: [MetadataGroup.ADVANCED],
spec: { value: 'sha1' },
},
{
name: 'skip-download',
summary: `Skip downloading build artifacts after command succeeds.`,
type: Boolean,
spec: { value: 'name' },
default: false,
},
],
};
}
Expand Down Expand Up @@ -126,6 +134,10 @@ Apart from ${input('--commit')}, every option can be specified using the full na
throw new Error(`Build ${build.state}`);
}

if (options['skip-download']) {
return;
}

const url = await this.getDownloadUrl(appflowId, buildId, token);

if (!url.url) {
Expand Down
14 changes: 13 additions & 1 deletion packages/@ionic/cli/src/commands/package/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export class BuildCommand extends Command {
groups: [MetadataGroup.PAID],
summary: 'Create a package build on Appflow',
description: `
This command creates a package build on Ionic Appflow. While the build is running, it prints the remote build log to the terminal. If the build is successful, it downloads the created app package file in the current directory.
This command creates a package build on Ionic Appflow. While the build is running, it prints the remote build log to the terminal. If the build is successful, it downloads the created app package file in the current directory. Downloading build artifacts can be skipped by supplying the flag ${input('skip-download')}.

Apart from ${input('--commit')}, every option can be specified using the full name setup within the Dashboard[^dashboard].

Expand Down Expand Up @@ -104,6 +104,7 @@ if you do not wish to download ${input('apk')}.
'android debug --native-config="My Custom Native Config Name"',
'android debug --commit=2345cd3305a1cf94de34e93b73a932f25baac77c',
'android debug --artifact-type=aab',
'android debug --skip-download',
'android debug --aab-name="my-app-prod.aab" --apk-name="my-app-prod.apk"',
'ios development --signing-certificate="iOS Signing Certificate Name" --build-stack="iOS - Xcode 9"',
'ios development --signing-certificate="iOS Signing Certificate Name" --ipa-name=my_custom_file_name.ipa',
Expand Down Expand Up @@ -201,6 +202,13 @@ if you do not wish to download ${input('apk')}.
type: String,
spec: { value: 'name' },
},
{
name: 'skip-download',
summary: `Skip downloading build artifacts after command succeeds.`,
type: Boolean,
spec: { value: 'name' },
default: false,
},
],
};
}
Expand Down Expand Up @@ -332,6 +340,10 @@ if you do not wish to download ${input('apk')}.
throw new Error(`Build ${build.state}`);
}

if (options['skip-download']) {
return;
}

const availableArtifactTypes = build.artifacts.map((artifact) => artifact.artifact_type);

if (Array.isArray(options['artifact-type'])) {
Expand Down