placementt-core 1.400.1174 → 1.400.1176
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/deploy-all.js +18 -18
- package/package.json +1 -1
package/deploy-all.js
CHANGED
|
@@ -27,24 +27,22 @@ function updateVersion(version) {
|
|
|
27
27
|
console.log(`✅ Updated version to ${version}`);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
//
|
|
33
|
-
//
|
|
34
|
-
|
|
30
|
+
// A publish that lands while the previous one is still being processed can
|
|
31
|
+
// overwrite that one's dist-tag (the version itself survives). Polling `npm view`
|
|
32
|
+
// to wait it out reads the CDN-cached packument, which lags by many minutes, so
|
|
33
|
+
// instead re-point every tag directly once all three are published.
|
|
34
|
+
const publishedVersions = {};
|
|
35
|
+
|
|
36
|
+
function publishWithTag(version, tag) {
|
|
35
37
|
run(`npm publish --tag ${tag}`);
|
|
38
|
+
publishedVersions[tag] = version;
|
|
39
|
+
}
|
|
36
40
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
execSync('sleep 5');
|
|
41
|
+
function pinDistTags() {
|
|
42
|
+
for (const [tag, version] of Object.entries(publishedVersions)) {
|
|
43
|
+
run(`npm dist-tag add placementt-core@${version} ${tag}`);
|
|
44
|
+
console.log(`✅ ${tag} → ${version}`);
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
console.error(`❌ ${tag} still not pointing at ${version} after 15 minutes. Fix with: npm dist-tag add placementt-core@${version} ${tag}`);
|
|
47
|
-
process.exit(1);
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
// ---- Keep original file contents for reset ----
|
|
@@ -91,7 +89,7 @@ console.log("🚀 Building (dev)...");
|
|
|
91
89
|
run('yarn tsc');
|
|
92
90
|
|
|
93
91
|
console.log(`📤 Publishing ${devVersion}`);
|
|
94
|
-
|
|
92
|
+
publishWithTag(devVersion, 'dev');
|
|
95
93
|
|
|
96
94
|
// -------------------------------
|
|
97
95
|
// 2️⃣ EMULATOR VERSION
|
|
@@ -111,7 +109,7 @@ console.log("🚀 Building (emulator)...");
|
|
|
111
109
|
run('yarn tsc');
|
|
112
110
|
|
|
113
111
|
console.log(`📤 Publishing ${emulatorVersion}`);
|
|
114
|
-
|
|
112
|
+
publishWithTag(emulatorVersion, 'emu');
|
|
115
113
|
|
|
116
114
|
// -------------------------------
|
|
117
115
|
// RESET FILES
|
|
@@ -129,7 +127,9 @@ console.log("🚀 Building (prod)...");
|
|
|
129
127
|
run('yarn tsc');
|
|
130
128
|
|
|
131
129
|
console.log(`📤 Publishing ${prodVersion}`);
|
|
132
|
-
|
|
130
|
+
publishWithTag(prodVersion, 'prod');
|
|
131
|
+
|
|
132
|
+
pinDistTags();
|
|
133
133
|
|
|
134
134
|
console.log("🎉 Deployment complete!");
|
|
135
135
|
|