chore: change version br actions

This commit is contained in:
lisonge
2023-09-04 19:10:27 +08:00
parent c121e1b8e1
commit 18da6555c7

View File

@@ -2,14 +2,9 @@ import dayjs from 'dayjs';
import _ from 'lodash';
import fs from 'node:fs/promises';
import path from 'node:path';
import type selfPkgT from '../package.json';
import { parseSelector } from './selector';
import type { IArray, SubscriptionConfig } from './types';
const selfPkg: typeof selfPkgT = JSON.parse(
await fs.readFile(process.cwd() + '/package.json', 'utf-8'),
);
const iArrayToArray = <T>(array: IArray<T> = []): T[] => {
return Array<T>().concat(array);
};
@@ -50,12 +45,6 @@ export const writeConfig = async (fp: string, config: SubscriptionConfig) => {
);
await fs.writeFile(fp, buffer);
const newPkg = { ...selfPkg, version: '0.0.' + newConfig.version };
await fs.writeFile(
process.cwd() + '/package.json',
JSON.stringify(newPkg, void 0, 2) + '\n',
);
await updateReadMeMd(newConfig);
console.log({