Skip to content

Commit 1560e94

Browse files
committed
merge: fix/element-linux-rollup-native into main
2 parents 2649543 + ac08531 commit 1560e94

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

.github/scripts/package-public-from-source.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,28 @@ mvn -B -pl java-chains-server -am \
7474
-Dsurefire.failIfNoSpecifiedTests=false \
7575
test
7676

77+
# Tagged Element packager looks for @rollup+rollup-linux-x64@, but pnpm installs
78+
# @rollup+rollup-linux-x64-gnu@. Patch the working tree only; source SHA is unchanged.
79+
ELEMENT_PACK="$SOURCE_DIR/scripts/frontend/package-java-chains-web-element.sh"
80+
if [ -f "$ELEMENT_PACK" ]; then
81+
note "accept linux-x64-gnu rollup optional packages"
82+
python3 - "$ELEMENT_PACK" <<'PY'
83+
from pathlib import Path
84+
import sys
85+
86+
path = Path(sys.argv[1])
87+
text = path.read_text()
88+
old = "const prefixes = ['@rollup+rollup-' + plat + '@', '@esbuild+' + plat + '@'];"
89+
new = "const prefixes = ['@rollup+rollup-' + plat, '@esbuild+' + plat];"
90+
if old not in text:
91+
raise SystemExit(
92+
"package-public-from-source: Element native-dep check not found; "
93+
"refusing to package"
94+
)
95+
path.write_text(text.replace(old, new, 1))
96+
PY
97+
fi
98+
7799
note "package public edition (-Pfrontend only)"
78100
mvn -B --threads 1C -pl java-chains-server,java-chains-cli -am clean package \
79101
-DskipTests \

.github/scripts/test-package-public-from-source-contract.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ require("-Pfrontend")
2828
require("TAG-BUILD.txt")
2929
require("official-presets.yaml")
3030
require("generate-release-notes.sh")
31+
require("linux-x64-gnu")
3132
require("edition=public")
3233
require("profiles=frontend")
3334
forbid("with-exploits")

0 commit comments

Comments
 (0)