lwazi 1.11.2 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/update.js +18 -1
- package/package.json +1 -1
package/bin/update.js
CHANGED
|
@@ -25,7 +25,6 @@ console.log("Updating Lwazi files...");
|
|
|
25
25
|
|
|
26
26
|
const ignore = new Set([
|
|
27
27
|
"node_modules",
|
|
28
|
-
".git",
|
|
29
28
|
"package-lock.json"
|
|
30
29
|
]);
|
|
31
30
|
|
|
@@ -54,7 +53,25 @@ if (fs.existsSync(targetDir)) {
|
|
|
54
53
|
console.log("Copying fresh lwazi files...");
|
|
55
54
|
copyDirectory(packageDir, targetDir);
|
|
56
55
|
|
|
56
|
+
// Mark as independent git repo to avoid parent repo branch conflicts
|
|
57
|
+
const gitFile = path.join(targetDir, ".git");
|
|
58
|
+
if (!fs.existsSync(gitFile)) {
|
|
59
|
+
fs.writeFileSync(gitFile, "gitdir: /dev/null\n");
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
console.log("Running composer update...");
|
|
63
|
+
|
|
64
|
+
// Always use dev-main since lwazi package has main branch
|
|
65
|
+
const composerFile = path.join(projectRoot, "composer.json");
|
|
66
|
+
if (fs.existsSync(composerFile)) {
|
|
67
|
+
const composer = JSON.parse(fs.readFileSync(composerFile, "utf8"));
|
|
68
|
+
|
|
69
|
+
if (composer.require && composer.require["lwazi/core"]) {
|
|
70
|
+
composer.require["lwazi/core"] = "dev-main";
|
|
71
|
+
fs.writeFileSync(composerFile, JSON.stringify(composer, null, 2) + "\n");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
58
75
|
try {
|
|
59
76
|
execSync("composer update lwazi/core --no-interaction", {
|
|
60
77
|
stdio: "inherit",
|