mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-19 11:08:37 +00:00
chore: Enable linting in scripts.
This commit is contained in:
@@ -6,7 +6,6 @@ type PackageJson = {
|
||||
version?: string;
|
||||
};
|
||||
|
||||
const root = resolve(".");
|
||||
const rootPackagePath = resolve("package.json");
|
||||
const rootPackage = JSON.parse(readFileSync(rootPackagePath, "utf8")) as PackageJson;
|
||||
const targetVersion = rootPackage.version;
|
||||
@@ -25,9 +24,13 @@ const changelogged: string[] = [];
|
||||
const skipped: string[] = [];
|
||||
|
||||
function ensureChangelogEntry(changelogPath: string, version: string): boolean {
|
||||
if (!existsSync(changelogPath)) return false;
|
||||
if (!existsSync(changelogPath)) {
|
||||
return false;
|
||||
}
|
||||
const content = readFileSync(changelogPath, "utf8");
|
||||
if (content.includes(`## ${version}`)) return false;
|
||||
if (content.includes(`## ${version}`)) {
|
||||
return false;
|
||||
}
|
||||
const entry = `## ${version}\n\n### Changes\n- Version alignment with core OpenClaw release numbers.\n\n`;
|
||||
if (content.startsWith("# Changelog\n\n")) {
|
||||
const next = content.replace("# Changelog\n\n", `# Changelog\n\n${entry}`);
|
||||
|
||||
Reference in New Issue
Block a user