mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-20 00:35:17 +08:00
chore: change version br actions
This commit is contained in:
11
src/file.ts
11
src/file.ts
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user