您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

28 行
840 B

  1. /* eslint-disable @typescript-eslint/no-var-requires */
  2. const fs = require('fs');
  3. // Patch README
  4. const insert = fs.readFileSync('./README.insiders.md', { encoding: 'utf8' });
  5. const data = fs.readFileSync('./README.md', { encoding: 'utf8' });
  6. fs.writeFileSync('./README.md', `${insert}\n${data}`);
  7. // Patch package.json
  8. const date = new Date(new Date().toLocaleString('en-US', { timeZone: 'America/New_York' }));
  9. let packageJSON = require('../package.json');
  10. packageJSON = JSON.stringify(
  11. {
  12. ...packageJSON,
  13. name: `${packageJSON.name}-insiders`,
  14. displayName: 'GitLens (Insiders)',
  15. version: `${String(date.getFullYear())}.${date.getMonth() + 1}.${date.getDate()}${String(
  16. date.getHours(),
  17. ).padStart(2, '0')}`,
  18. preview: true,
  19. },
  20. undefined,
  21. '\t',
  22. );
  23. packageJSON += '\n';
  24. fs.writeFileSync('./package.json', packageJSON);