Unverified Commit 7432c20f authored by Ray Schamp's avatar Ray Schamp Committed by GitHub

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

[Develop] Conditionally purge on deploys
parents c3f34ab0 51d980cf
...@@ -177,10 +177,12 @@ async.auto({ ...@@ -177,10 +177,12 @@ async.auto({
fastly.activateVersion(results.version, function (err, response) { fastly.activateVersion(results.version, function (err, response) {
if (err) throw new Error(err); if (err) throw new Error(err);
process.stdout.write('Successfully configured and activated version ' + response.number + '\n'); process.stdout.write('Successfully configured and activated version ' + response.number + '\n');
fastly.purgeAll(FASTLY_SERVICE_ID, function (err) { if (process.env.FASTLY_PURGE_ALL) {
if (err) throw new Error(err); fastly.purgeAll(FASTLY_SERVICE_ID, function (err) {
process.stdout.write('Purged all.\n'); 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