Unverified Commit deae3b1a authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

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

[Master] Conditionally purge on deploys
parents ec507b73 51d980cf
......@@ -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');
});
}
});
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment