Merge pull request #1718 from rschamp/hotfix/no-purge-deploys

[Develop] Conditionally purge on deploys
This commit is contained in:
Ray Schamp 2017-12-01 15:45:44 -05:00 committed by GitHub
commit 7432c20f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -177,10 +177,12 @@ async.auto({
fastly.activateVersion(results.version, function (err, response) {
if (err) throw new Error(err);
process.stdout.write('Successfully configured and activated version ' + response.number + '\n');
fastly.purgeAll(FASTLY_SERVICE_ID, function (err) {
if (err) throw new Error(err);
process.stdout.write('Purged all.\n');
});
if (process.env.FASTLY_PURGE_ALL) {
fastly.purgeAll(FASTLY_SERVICE_ID, function (err) {
if (err) throw new Error(err);
process.stdout.write('Purged all.\n');
});
}
});
}
}