Fix Windows installer build provenance generation
Build and package / build-package (push) Successful in 5m23s
Build Windows installer / build-windows (push) Successful in 6m57s

The Windows build stages git archive output into the Wine container, so the
staged tree has no .git directory. write-build-info.js previously called
git rev-parse there and aborted the installer build. Pass the source revision
and clean-tree state from the host checkout instead, and cover the wiring in
the WSL packaging test.

Release 1.0.2.
This commit is contained in:
Zaher Salman committed 2026-11-09 22:41:18 +01:00
1 parent 8fa4414319
commit 53e71f0940
6 files changed
+23 -4

No files matched your search

+7
View File
@@ -3,6 +3,13 @@
All notable changes to muSRFlow are recorded here. The project follows the
release path documented in [`TODO.md`](TODO.md).
## 1.0.2 (2026-11-09)
- Windows installers built from a `git archive` staging tree no longer fail
while generating build provenance. The source revision and clean-tree state
are passed into the Wine build container instead of invoking Git in a tree
that has no `.git` directory.
## 1.0.1 (2026-11-09)
- Single-run web fits now reuse the startup server probe, write the runnable
+1 -1
View File
@@ -4,7 +4,7 @@ muSRFlow makes fitting muSR spectra easier: create and edit MSR models, fit
single runs or run series, inspect spectra, and plot fitted parameters.
It is available as a desktop application and a web application.
Current version: **1.0.1**.
Current version: **1.0.2**.
## Installation
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "musrflow",
"version": "1.0.1",
"version": "1.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "musrflow",
"version": "1.0.1",
"version": "1.0.2",
"license": "GPL-3.0-or-later",
"dependencies": {
"plotly.js-dist": "^3.5.1",
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "musrflow",
"productName": "muSRFlow",
"version": "1.0.1",
"version": "1.0.2",
"description": "A desktop and web workflow for musrfit",
"main": "main.js",
"scripts": {
+5
View File
@@ -19,6 +19,10 @@ gzip -t "$rootfs"
# or host node_modules into the Wine build container.
git -C "$source_dir" diff --quiet
git -C "$source_dir" diff --cached --quiet
# The staged source comes from git archive and has no .git directory. Record
# the revision here so write-build-info.js does not need to invoke Git inside
# the Wine container.
revision=$(git -C "$source_dir" rev-parse HEAD)
mkdir -p "$out"
out=$(cd "$out" && pwd)
stage=$(mktemp -d "$out/.windows-stage.XXXXXX")
@@ -38,6 +42,7 @@ cp "$rootfs" "$stage/packaging/wsl2/out/muSRFlow-runtime-rootfs.tar.gz"
container_id=$("$engine" create --name "musrflow-windows-$$-$RANDOM" \
--workdir /project -v "$stage:/project" \
-e ELECTRON_SKIP_BINARY_DOWNLOAD=1 -e CSC_IDENTITY_AUTO_DISCOVERY=false \
-e "MUSRFLOW_BUILD_REVISION=$revision" -e MUSRFLOW_BUILD_MODIFIED=0 \
"$builder" bash -c '
set -euo pipefail
node --version
+7
View File
@@ -111,6 +111,13 @@ esac
assert(fs.existsSync(installer + '.sha256'));
assert(fs.existsSync(installer + '.md5'));
assert(!fs.readdirSync(windowsOut).some(name => name.startsWith('.windows-stage.')));
const sourceRevision = execFileSync('git', ['rev-parse', 'HEAD'], { cwd: source, encoding: 'utf8' }).trim();
const createCall = fs.readFileSync(log, 'utf8').split('\n')
.find(line => line.startsWith('create ') && line.includes('musrflow-windows-'));
// The staged tree has no .git; write-build-info.js must receive provenance
// through the environment instead of running Git inside the container.
assert(createCall.includes(`MUSRFLOW_BUILD_REVISION=${sourceRevision}`), createCall);
assert(createCall.includes('MUSRFLOW_BUILD_MODIFIED=0'), createCall);
for (const phase of ['create', 'start', 'payload', 'signature']) {
fs.writeFileSync(log, '');
const failed = runBuild('build-windows-ci.sh', { ...windowsEnv, TEST_FAIL: phase });