Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override @parcel/watcher version for portal:v2.6.3 on arm64. #19

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions v2.6.3/harbor-portal/rockcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ parts:
source-tag: v2.6.3
source-depth: 1
build-packages:
- g++
- python3-yaml
build-snaps:
- node/16/stable
Expand All @@ -83,6 +84,17 @@ parts:

cd "$OUTDIR"
mkdir -p "$OUTDIR/dist"

# HACK(aznashwan): add override for listed parcel/watcher which fails to build on ARM64.
# Sadly 2.1.0 also shows the same issue, with 2.2.0 being the earliest
# release available on NPM which actually works...
# https://github.com/parcel-bundler/watcher/issues/156#issuecomment-1762236540
if [ "$CRAFT_TARGET_ARCH" == "arm64" ]; then
PACKAGE_JSON="$OUTDIR/package.json"
python3 -c 'import sys, json; p=json.loads(sys.stdin.read()); p["overrides"] = {"@parcel/watcher": "2.2.0"}; print(json.dumps(p, indent=4))' < "$PACKAGE_JSON" > "$PACKAGE_JSON.new"
mv "$PACKAGE_JSON.new" "$PACKAGE_JSON"
fi

npm install --unsafe-perm
npm run generate-build-timestamp

Expand Down
Loading