mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-05-02 08:54:47 -04:00
Conditionally purge on deploys
We can configure this within Travis
This commit is contained in:
parent
ec507b73c5
commit
51d980cfb3
1 changed files with 6 additions and 4 deletions
|
@ -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');
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue