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

[Master] Conditionally purge on deploys
This commit is contained in:
Ray Schamp 2017-12-01 15:56:31 -05:00 committed by GitHub
commit deae3b1ad0
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');
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');
});
}
});
}
}