From 517eefa28b182592cd3258af7880450218dfc4ce Mon Sep 17 00:00:00 2001 From: "William L. Anderson" Date: Sun, 20 Apr 2025 11:36:27 -0500 Subject: [PATCH] trying to synchronize the versions and files --- .npmrc | 1 + manifest.json | 2 +- version-bump.mjs | 14 ++++++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .npmrc create mode 100644 version-bump.mjs diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b973752 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +tag-version-prefix="" \ No newline at end of file diff --git a/manifest.json b/manifest.json index 1443d4a..bffea2a 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "id": "folder-filelist", "name": "Folder Filelist", "version": "1.1.1", - "minAppVersion": "1.8.0", + "minAppVersion": "0.15.0", "description": "Create and maintain a list of wikilinks to files in specified folders", "author": "band", "authorUrl": "https://github.com/band", diff --git a/version-bump.mjs b/version-bump.mjs new file mode 100644 index 0000000..d409fa0 --- /dev/null +++ b/version-bump.mjs @@ -0,0 +1,14 @@ +import { readFileSync, writeFileSync } from "fs"; + +const targetVersion = process.env.npm_package_version; + +// read minAppVersion from manifest.json and bump version to target version +let manifest = JSON.parse(readFileSync("manifest.json", "utf8")); +const { minAppVersion } = manifest; +manifest.version = targetVersion; +writeFileSync("manifest.json", JSON.stringify(manifest, null, "\t")); + +// update versions.json with target version and minAppVersion from manifest.json +let versions = JSON.parse(readFileSync("versions.json", "utf8")); +versions[targetVersion] = minAppVersion; +writeFileSync("versions.json", JSON.stringify(versions, null, "\t"));