@rightkit/release 0.2.86 → 0.2.87
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 +2 -2
- package/package.json +1 -1
- package/release-cache-mode.mjs +8 -0
- package/rightkit-versions.json +1 -1
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
|
|
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.
|
|
3
|
+
"version": "0.2.87",
|
|
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
|
+
}
|
package/rightkit-versions.json
CHANGED