mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #3093 from overleaf/jpa-offline-migration-image-name
[scripts] add a script for back-filling the imageName into projects GitOrigin-RevId: 150d2e53f99a4b3baee0df3e2036576c36c7db43
This commit is contained in:
parent
b5d3919911
commit
1f0ee8e1ca
1 changed files with 16 additions and 0 deletions
16
services/web/scripts/backfill_project_image_name.js
Normal file
16
services/web/scripts/backfill_project_image_name.js
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
const minimist = require('minimist')
|
||||||
|
const { batchedUpdateWithResultHandling } = require('./helpers/batchedUpdate')
|
||||||
|
|
||||||
|
const argv = minimist(process.argv.slice(2))
|
||||||
|
const commit = argv.commit !== undefined
|
||||||
|
|
||||||
|
if (!commit) {
|
||||||
|
console.error('DOING DRY RUN. TO SAVE CHANGES PASS --commit')
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
batchedUpdateWithResultHandling(
|
||||||
|
'projects',
|
||||||
|
{ imageName: null },
|
||||||
|
{ $set: { imageName: 'quay.io/sharelatex/texlive-full:2014.2' } }
|
||||||
|
)
|
Loading…
Reference in a new issue