25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

25 lines
802 B

/* eslint-disable import/order */
/* eslint-disable @typescript-eslint/no-var-requires */
'use strict';
const fs = require('fs');
// Patch README
const insert = fs.readFileSync('./README.insiders.md', { encoding: 'utf8' });
const data = fs.readFileSync('./README.md', { encoding: 'utf8' });
fs.writeFileSync('./README.md', `${insert}\n${data}`);
// Patch package.json
const date = new Date(new Date().toLocaleString('en-US', { timeZone: 'America/New_York' }));
let json = require('../package.json');
json = JSON.stringify({
...json,
name: `${json.name}-insiders`,
displayName: 'GitLens (Insiders)',
version: `${String(date.getFullYear())}.${date.getMonth() + 1}.${date.getDate()}${String(date.getHours()).padStart(
2,
'0',
)}`,
preview: true,
});
fs.writeFileSync('./package.json', json);