@rightkit/ci 0.3.6 → 0.3.7

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.
Files changed (2) hide show
  1. package/manifest.mjs +5 -2
  2. package/package.json +1 -1
package/manifest.mjs CHANGED
@@ -2202,7 +2202,8 @@ const CLASS_A_TOOL_STEPS = Object.freeze([
2202
2202
  " esac",
2203
2203
  " archive=\"$RUNNER_TEMP/actionlint-$asset\"",
2204
2204
  " curl --fail --silent --show-error --location --output \"$archive\" \"https://github.com/rhysd/actionlint/releases/download/v$ACTIONLINT_VERSION/actionlint_\"\"$ACTIONLINT_VERSION\"\"_$asset\"",
2205
- " actual=\"$( (sha256sum \"$archive\" 2>/dev/null || shasum -a 256 \"$archive\") | cut -d' ' -f1)\"",
2205
+ // Hash from stdin: GNU sha256sum escapes a path with backslashes (every Windows $RUNNER_TEMP) and prefixes the line with "\".
2206
+ " actual=\"$( (sha256sum < \"$archive\" 2>/dev/null || shasum -a 256 < \"$archive\") | cut -d' ' -f1)\"",
2206
2207
  " [ \"$actual\" = \"$sum\" ] || { echo \"::error::actionlint archive checksum mismatch\"; exit 1; }",
2207
2208
  " mkdir -p \"$RUNNER_TEMP/actionlint-bin\"",
2208
2209
  " case \"$asset\" in *.zip) unzip -o -q \"$archive\" actionlint.exe -d \"$RUNNER_TEMP/actionlint-bin\" ;; *) tar -xzf \"$archive\" -C \"$RUNNER_TEMP/actionlint-bin\" actionlint ;; esac",
@@ -2213,6 +2214,8 @@ const CLASS_A_TOOL_STEPS = Object.freeze([
2213
2214
  " shell: bash",
2214
2215
  " run: |",
2215
2216
  " set -euo pipefail",
2217
+ // The gate's Mac default root is on /Volumes/D, which a hosted runner has not got: this run's gate steps keep their state in the runner's temp.
2218
+ " if [ \"$RUNNER_OS\" = macOS ]; then export RIGHTKIT_DATA_ROOT=\"$RUNNER_TEMP/rightkit-data\"; echo \"RIGHTKIT_DATA_ROOT=$RIGHTKIT_DATA_ROOT\" >> \"$GITHUB_ENV\"; fi",
2216
2219
  " rk=node_modules/@rightkit/release",
2217
2220
  " [ -f \"$rk/scan-tool-enrolment.mjs\" ] || exit 0",
2218
2221
  " root=\"$(node --input-type=module -e \"import { resolveManagedRoots } from './$rk/managed-roots.mjs'; console.log(resolveManagedRoots().gateRoot)\")\"",
@@ -2220,7 +2223,7 @@ const CLASS_A_TOOL_STEPS = Object.freeze([
2220
2223
  " tool=\"${spec%@*}\"; bin=\"$(command -v \"$tool\")\"",
2221
2224
  // Git Bash on Windows names the file without .exe and as /c/...: the gate spawns the Windows path of the real file.
2222
2225
  " if command -v cygpath >/dev/null; then [ -f \"$bin.exe\" ] && bin=\"$bin.exe\"; bin=\"$(cygpath -w \"$bin\")\"; fi",
2223
- " sum=\"$( (sha256sum \"$bin\" 2>/dev/null || shasum -a 256 \"$bin\") | cut -d' ' -f1)\"",
2226
+ " sum=\"$( (sha256sum < \"$bin\" 2>/dev/null || shasum -a 256 < \"$bin\") | cut -d' ' -f1)\"",
2224
2227
  " node \"$rk/scan-tool-enrolment.mjs\" enroll --data-root \"$root\" --tool \"$tool\" --path \"$bin\" --sha256 \"$sum\" --version \"${spec#*@}\"",
2225
2228
  " done",
2226
2229
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/ci",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Public-repo-only GitHub Actions workflow layer: templates, visibility gate, sync/drift/adopt/uninstall for right-git.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",