diff --git a/CHANGELOG.md b/CHANGELOG.md index b854fa7..d627db1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/README.md b/README.md index 3c1d0cd..431eecf 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/package-lock.json b/package-lock.json index f8244e5..f98e719 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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", diff --git a/package.json b/package.json index 3e5f17b..bf49c4c 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/packaging/wsl2/build-windows-ci.sh b/packaging/wsl2/build-windows-ci.sh index 0504ac8..7495fc2 100644 --- a/packaging/wsl2/build-windows-ci.sh +++ b/packaging/wsl2/build-windows-ci.sh @@ -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 diff --git a/tests/wsl-packaging.test.js b/tests/wsl-packaging.test.js index cc1d74d..d064332 100644 --- a/tests/wsl-packaging.test.js +++ b/tests/wsl-packaging.test.js @@ -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 });