fix: normalize reproducible Planegcs artifacts

This commit is contained in:
2026-08-10 16:34:39 -04:00
parent 7f10bba38f
commit 307db88346
2 changed files with 6 additions and 1 deletions

View File

@@ -7,7 +7,7 @@
"javascript": {
"path": "native/planegcs/dist/freecad-planegcs.js",
"publicPath": "public/native/planegcs/freecad-planegcs.js",
"sha256": "702d267b856b8a1c9d1a031fbbd9780419c3e359a99d7d6922b5df668ed79d2e"
"sha256": "442eaafe2488baa10a3b5006d26264a2bc7c04c60a4b1261be37482ea28db0a1"
},
"wasm": {
"path": "native/planegcs/dist/freecad-planegcs.wasm",

View File

@@ -44,6 +44,11 @@ em++ \
-sNO_EXIT_RUNTIME=1 \
-o "${DIST_DIR}/freecad-planegcs.js"
# Emscripten output contains a version-sensitive trailing-space-only line.
# Normalize it before copying and hashing so native and public artifacts stay
# byte-identical across a clean rebuild.
perl -pi -e 's/[ \t]+$//' "${DIST_DIR}/freecad-planegcs.js"
cp "${ROOT_DIR}/native/planegcs/package.json" "${DIST_DIR}/package.json"
cp "${DIST_DIR}/freecad-planegcs.js" "${PUBLIC_DIR}/freecad-planegcs.js"
cp "${DIST_DIR}/freecad-planegcs.wasm" "${PUBLIC_DIR}/freecad-planegcs.wasm"