Skip to content

Commit

Permalink
Fix bug in sync (#189)
Browse files Browse the repository at this point in the history
* Fix bug in sync
  • Loading branch information
Hysterelius authored Aug 3, 2024
1 parent 3426d32 commit 8e74980
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions package_abridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,11 @@ async function sync() {
})).sort((a, b) => a.name.localeCompare(b.name));
};

if (packageJsonContent !== submodulePackageJsonContent) {
console.log("Updating package.json from submodule");
fs.copyFileSync(submodulePackageJson, packageJson);
}

const packageVersionLocal = checkPackageVersion(packageJsonContent);
const packageVersionSubmodule = checkPackageVersion(submodulePackageJsonContent);
if (JSON.stringify(packageVersionLocal) !== JSON.stringify(packageVersionSubmodule)) {
Expand All @@ -379,11 +384,7 @@ async function sync() {
exit(1);
}
console.log(packageVersionLocal, packageVersionSubmodule);

if (packageJsonContent !== submodulePackageJsonContent) {
console.log("Updating package.json from submodule");
fs.copyFileSync(submodulePackageJson, packageJson);
}

const configToml = path.join(__dirname, "config.toml");
const submoduleConfigToml = path.join(
__dirname,
Expand Down

0 comments on commit 8e74980

Please sign in to comment.