backfill_project_image_name.js 444 B

12345678910111213141516
  1. const minimist = require('minimist')
  2. const { batchedUpdateWithResultHandling } = require('./helpers/batchedUpdate')
  3. const argv = minimist(process.argv.slice(2))
  4. const commit = argv.commit !== undefined
  5. if (!commit) {
  6. console.error('DOING DRY RUN. TO SAVE CHANGES PASS --commit')
  7. process.exit(1)
  8. }
  9. batchedUpdateWithResultHandling(
  10. 'projects',
  11. { imageName: null },
  12. { $set: { imageName: 'quay.io/sharelatex/texlive-full:2014.2' } }
  13. )