mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-11 11:15:24 +03:00
Ensure cirrus scripts don't upload rolling release on pr or commit builds
This commit is contained in:
parent
96f9f91c0a
commit
e18e8628d0
@ -101,7 +101,7 @@ arm_linux_task:
|
||||
rolling_upload_script:
|
||||
- cd ./script/rolling-release-scripts
|
||||
- npm install
|
||||
- node ./rolling-release-binary-upload.js
|
||||
- node ./rolling-release-binary-upload.js cirrus
|
||||
always:
|
||||
videos_artifacts:
|
||||
path: ./tests/videos/**
|
||||
@ -149,7 +149,7 @@ silicon_mac_task:
|
||||
rolling_upload_script:
|
||||
- cd ./script/rolling-release-scripts
|
||||
- npm install
|
||||
- node ./rolling-release-binary-upload.js
|
||||
- node ./rolling-release-binary-upload.js cirrus
|
||||
always:
|
||||
videos_artifacts:
|
||||
path: ./tests/videos/**
|
||||
|
@ -16,6 +16,21 @@ if (verSegments[verSegments.length - 1].length > 4) {
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
// Again since cirrus ALWAYS triggers this script, without being able to skip for
|
||||
// non PR builds, Cirrus provides cli args to indicate that it is being run via cirrus,
|
||||
// so we can exit depending on the presence of certain env vars
|
||||
let cirrusFlag = process.argv.slice(2)[0];
|
||||
|
||||
if (cirrusFlag === "cirrus") {
|
||||
if (typeof process.env.CIRRUS_CHANGE_MESSAGE === "string") {
|
||||
// This build is the result of a PR or commit, not a cron job rolling release,
|
||||
// lets exit
|
||||
console.log("Due to the presence of `CIRRUS_CHANGE_MESSAGE` it seems this is a PR created build...");
|
||||
console.log("Exiting without uploading binaries...");
|
||||
process.exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
(async () => {
|
||||
|
||||
if (!fs.existsSync("../../binaries")) {
|
||||
|
Loading…
Reference in New Issue
Block a user