@rightkit/release 0.2.86 → 0.2.88

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/build-release.mjs CHANGED
@@ -28,6 +28,7 @@ import { commandOutputPortable, releaseEnvironment, resolveReleaseLayout, runBui
28
28
  import { acquireCacheLease, acquireSuiteBuildSlot, applyCachePrune, assertWriteVolumeFloors, inspectCache, inspectWriteVolumes, markCacheEntrySuccessful, planCachePrune, readCachePolicy, resolveCacheLayout, resolveSharedCacheIdentity, resolveSharedCacheRoot } from "./cache-policy.mjs";
29
29
  import { createTargetBridge } from "./target-bridge.mjs";
30
30
  import { brokerManagedHost } from "./cargo-contract.mjs";
31
+ import { resolveReleaseCacheMode } from "./release-cache-mode.mjs";
31
32
  import { resolveTargetRoot } from "./cargo-target.mjs";
32
33
  import { assertNsisInPlaceUpgradeContract } from "./nsis-upgrade-contract.mjs";
33
34
  import { buildPathPrefix, collectPreflight, formatPreflight, preflightFailures } from "./preflight.mjs";
@@ -203,8 +204,7 @@ try {
203
204
  const managedCargoTarget = brokerManagedHost(process.env) ? resolveTargetRoot(cargoToml) : null;
204
205
  const cacheIdentity = resolveSharedCacheIdentity({ cargoLockPath: cargoLock, cargoTomlPath: cargoToml, rustcVerbose: toolVersions.rustc, targetTriple: target.cargoTarget ?? target.targetTriple ?? target.rustTarget ?? toolVersions.rustHost, profile: target.profile ?? "release" });
205
206
  const cacheKey = hashFileText(JSON.stringify({ cache: cacheIdentity.fingerprint, signingIdentity })).slice(0, 16);
206
- const cacheModeRequested = process.env.RIGHT_RELEASE_CACHE_MODE ?? (platform === "mac" || platform === "win" ? "shared" : "legacy");
207
- if (cacheModeRequested !== "legacy" && cacheModeRequested !== "shared") fail("RIGHT_RELEASE_CACHE_MODE must be legacy or shared");
207
+ const cacheModeRequested = resolveReleaseCacheMode({ requested: process.env.RIGHT_RELEASE_CACHE_MODE, platform, env: process.env });
208
208
  // On a broker-managed host, Cache V2's lease/slot/prune/floor/mark chain is not
209
209
  // running against the directory that will actually hold build output — the
210
210
  // broker owns CARGO_TARGET_DIR unconditionally (see managedCargoTarget above).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.2.86",
3
+ "version": "0.2.88",
4
4
  "description": "Portable Right Suite release CLI/SDK: signed native archives, direct bootstrap transactions, immutable GitHub Release upload, R2 bootstrap publication, and add-on adoption.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -0,0 +1,8 @@
1
+ export function resolveReleaseCacheMode({ requested, platform, env = process.env } = {}) {
2
+ const fallback = env.GITHUB_ACTIONS === "true"
3
+ ? "legacy"
4
+ : platform === "mac" || platform === "win" ? "shared" : "legacy";
5
+ const mode = requested ?? fallback;
6
+ if (mode !== "legacy" && mode !== "shared") throw new Error("RIGHT_RELEASE_CACHE_MODE must be legacy or shared");
7
+ return mode;
8
+ }
@@ -22,7 +22,7 @@
22
22
  "@rightkit/logs": "0.1.4",
23
23
  "@rightkit/platform-ui": "0.1.1",
24
24
  "@rightkit/qa": "0.2.1",
25
- "@rightkit/release": "0.2.86",
25
+ "@rightkit/release": "0.2.88",
26
26
  "@rightkit/tauri": "0.1.1",
27
27
  "@rightkit/updates": "0.2.4"
28
28
  },
@@ -37,7 +37,13 @@
37
37
  "0.2.4",
38
38
  "0.2.5",
39
39
  "0.2.6",
40
- "0.2.7"
40
+ "0.2.7",
41
+ "0.2.8",
42
+ "0.2.9",
43
+ "0.2.10",
44
+ "0.2.11",
45
+ "0.2.12",
46
+ "0.2.13"
41
47
  ],
42
48
  "@rightkit/legal-ui": [
43
49
  "0.1.0"