Skip to content

Commit

Permalink
Override @parcel/watcher version for portal:v2.6.3.
Browse files Browse the repository at this point in the history
Signed-off-by: Nashwan Azhari <[email protected]>
  • Loading branch information
aznashwan committed Jul 24, 2024
1 parent 751ce5a commit eac2e2c
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit eac2e2c

Please sign in to comment.