mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-21 20:30:47 +02:00
fix: use portable archive paths on Windows
This commit is contained in:
@@ -120,12 +120,15 @@ jobs:
|
|||||||
browser_cleanup
|
browser_cleanup
|
||||||
trap - EXIT
|
trap - EXIT
|
||||||
stage="$RUNNER_TEMP/runtime-components"
|
stage="$RUNNER_TEMP/runtime-components"
|
||||||
mkdir -p "$stage" "$GITHUB_WORKSPACE/release-output"
|
# GNU tar treats a Windows drive colon in an archive path as a
|
||||||
|
# remote-host separator. Keep archive output in Git Bash's POSIX view.
|
||||||
|
release_dir="$(pwd -P)/release-output"
|
||||||
|
mkdir -p "$stage" "$release_dir"
|
||||||
node .github/scripts/stage-runtime-components.mjs "$active" "$stage"
|
node .github/scripts/stage-runtime-components.mjs "$active" "$stage"
|
||||||
for component_dir in "$stage"/*; do
|
for component_dir in "$stage"/*; do
|
||||||
test -d "$component_dir" || continue
|
test -d "$component_dir" || continue
|
||||||
component=$(basename "$component_dir")
|
component=$(basename "$component_dir")
|
||||||
archive="$GITHUB_WORKSPACE/release-output/gstack-runtime-2.0.0-$TARGET-$component.tar.gz"
|
archive="$release_dir/gstack-runtime-2.0.0-$TARGET-$component.tar.gz"
|
||||||
tar -czf "$archive" -C "$component_dir" gstack
|
tar -czf "$archive" -C "$component_dir" gstack
|
||||||
node -e 'const fs=require("fs"),c=require("crypto"),p=process.argv[1];const b=fs.readFileSync(p);fs.writeFileSync(p+".sha256",c.createHash("sha256").update(b).digest("hex")+" "+require("path").basename(p)+"\n")' "$archive"
|
node -e 'const fs=require("fs"),c=require("crypto"),p=process.argv[1];const b=fs.readFileSync(p);fs.writeFileSync(p+".sha256",c.createHash("sha256").update(b).digest("hex")+" "+require("path").basename(p)+"\n")' "$archive"
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const BOOTSTRAP_RUNTIME_VERSION = "2.0.0";
|
|||||||
// Keep the runtime compatibility version separate from the immutable release
|
// Keep the runtime compatibility version separate from the immutable release
|
||||||
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
// channel. Release candidates carry the 2.0.0 runtime contract while letting
|
||||||
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
// fresh-machine production journeys run before the stable v2.0.0 tag exists.
|
||||||
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.4";
|
export const BOOTSTRAP_RELEASE_TAG = "v2.0.0-rc.5";
|
||||||
export const OFFICIAL_MANIFEST_URL =
|
export const OFFICIAL_MANIFEST_URL =
|
||||||
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
`https://github.com/time-attack/gstack/releases/download/${BOOTSTRAP_RELEASE_TAG}/gstack-runtime-manifest.json`;
|
||||||
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
const CAPABILITIES = new Set(["browser", "browser-visible", "design", "pdf", "diagram", "ios"]);
|
||||||
|
|||||||
@@ -66,6 +66,9 @@ describe("GStack runtime release channel", () => {
|
|||||||
expect(workflow).toContain('gh release create "$GITHUB_REF_NAME"');
|
expect(workflow).toContain('gh release create "$GITHUB_REF_NAME"');
|
||||||
expect(workflow).toContain("pathToFileURL(p).href");
|
expect(workflow).toContain("pathToFileURL(p).href");
|
||||||
expect(workflow).toContain('path").join(process.env.GITHUB_WORKSPACE,".gstack-runtime-smoke.html")');
|
expect(workflow).toContain('path").join(process.env.GITHUB_WORKSPACE,".gstack-runtime-smoke.html")');
|
||||||
|
expect(workflow).toContain('release_dir="$(pwd -P)/release-output"');
|
||||||
|
expect(workflow).toContain('archive="$release_dir/gstack-runtime-2.0.0-$TARGET-$component.tar.gz"');
|
||||||
|
expect(workflow).not.toContain('archive="$GITHUB_WORKSPACE/release-output/');
|
||||||
expect(workflow).not.toContain("goto about:blank");
|
expect(workflow).not.toContain("goto about:blank");
|
||||||
expect(buildSection).not.toContain("sigstore/cosign-installer");
|
expect(buildSection).not.toContain("sigstore/cosign-installer");
|
||||||
expect(manifestSection).toContain("sigstore/cosign-installer");
|
expect(manifestSection).toContain("sigstore/cosign-installer");
|
||||||
|
|||||||
Reference in New Issue
Block a user