Skip to content

Commit 72140bb

Browse files
authored
Remove use of commander from release script rather than adding it as a required production dependency (#17215)
1 parent 4e6c273 commit 72140bb

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

script/purge-redis-pages.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
//
99
// [end-readme]
1010

11-
const program = require('commander')
1211
const Redis = require('ioredis')
1312

1413
const { REDIS_URL, HEROKU_RELEASE_VERSION, HEROKU_PRODUCTION_APP } = process.env
@@ -21,12 +20,8 @@ const startTime = Date.now()
2120
const expirationDuration = 30 * 60 * 1000 // 30 minutes
2221
const expirationTimestamp = startTime + expirationDuration // 30 minutes from now
2322

24-
program
25-
.description('Purge the Redis rendered page cache')
26-
.option('-d, --dry-run', 'print keys to be purged without actually purging')
27-
.parse(process.argv)
28-
29-
const dryRun = program.dryRun
23+
// print keys to be purged without actually purging
24+
const dryRun = ['-d', '--dry-run'].includes(process.argv[2])
3025

3126
// verify environment variables
3227
if (!REDIS_URL) {

0 commit comments

Comments
 (0)