mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-03-23 23:57:23 +01:00
Update scripts/bump-version.js
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
ff42f711f4
commit
30665ff4c5
1 changed files with 8 additions and 3 deletions
|
|
@ -231,9 +231,14 @@ function updatePublicJsDynamicImportHashes(changedFiles, newVersion, dry) {
|
||||||
if (changedFiles.length === 0) {
|
if (changedFiles.length === 0) {
|
||||||
console.log(" public/**/*.js (no changed public/*.js files detected)");
|
console.log(" public/**/*.js (no changed public/*.js files detected)");
|
||||||
return;
|
return;
|
||||||
}
|
const replacement = `${quote}${relImportPath}?v=${newVersion}${quote}`;
|
||||||
|
// Only record and apply an update if the version actually changes
|
||||||
const changedSet = new Set(changedFiles);
|
if (match === replacement) {
|
||||||
|
return match;
|
||||||
|
}
|
||||||
|
if (!updatedMap[relJsFile]) updatedMap[relJsFile] = [];
|
||||||
|
updatedMap[relJsFile].push(relImportPath);
|
||||||
|
return replacement;
|
||||||
const publicJsFiles = getAllPublicJsFiles();
|
const publicJsFiles = getAllPublicJsFiles();
|
||||||
const updatedMap = {};
|
const updatedMap = {};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue