Commit 51d980cf authored by Ray Schamp's avatar Ray Schamp

Conditionally purge on deploys

We can configure this within Travis
parent ec507b73
...@@ -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