Skip to content

Commit

Permalink
CI: Skip PackageCloud upload if API key var unset
Browse files Browse the repository at this point in the history
We can't authenticate to PackageCloud
without an API key, so don't try to.
  • Loading branch information
DeeDeeG committed Aug 13, 2020
1 parent c623788 commit d558f1c
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions script/vsts/upload-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,26 @@ async function uploadArtifacts() {
);
} else {
console.log(
'\nEnvironment variables "ATOM_RELEASES_S3_KEY" and/or "ATOM_RELEASES_S3_SECRET" were not set, skipping S3 upload.'
'\nEnvironment variables "ATOM_RELEASES_S3_KEY" and/or "ATOM_RELEASES_S3_SECRET" are not set, skipping S3 upload.'
);
}

if (argv.linuxRepoName) {
await uploadLinuxPackages(
argv.linuxRepoName,
process.env.PACKAGE_CLOUD_API_KEY,
releaseVersion,
assets
);
if (
process.env.PACKAGE_CLOUD_API_KEY &&
process.env.PACKAGE_CLOUD_API_KEY !== '$(PACKAGE_CLOUD_API_KEY)'
) {
await uploadLinuxPackages(
argv.linuxRepoName,
process.env.PACKAGE_CLOUD_API_KEY,
releaseVersion,
assets
);
} else {
console.log(
'\nEnvironment variable "PACKAGE_CLOUD_API_KEY" is not set, skipping PackageCloud upload.'
);
}
} else {
console.log(
'\nNo Linux package repo name specified, skipping Linux package upload.'
Expand Down

0 comments on commit d558f1c

Please sign in to comment.