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

upgpatch: code #2892

Merged
merged 1 commit into from
Aug 10, 2023
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
6 changes: 3 additions & 3 deletions code/riscv64.patch
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
+
+ # The build process wants a zipped electron, let's construct one from system electron and put it in cache.
+ local _electron_ver=$(</usr/lib/$_electron/version)
+ # Not sure why /bin/sha256sum returns a different result. We have to invoke node here.
+ local _hash=$(node -e "console.log(crypto.createHash('sha256').update('https://github.com/electron/electron/releases/download/v$_electron_ver').digest('hex'))")
+ local _electron_zip="electron-v$_electron_ver-linux-$CARCH.zip"
+ local _hash=$(echo -n "https://github.com/electron/electron/releases/download/v$_electron_ver" | sha256sum | cut -d ' ' -f 1)
+ local _electron_zip="electron-v$_electron_ver-linux-riscv64.zip"
+ cd "/usr/lib/$_electron" && zip -r "/tmp/$_electron_zip" ./ && cd -
+ echo "$(sha256sum "/tmp/$_electron_zip" | cut -d " " -f 1) *$_electron_zip" >> build/checksums/electron.txt
+ local _cache_dir="$HOME/.cache/electron/$_hash"
+ mkdir -p "$_cache_dir" && mv "/tmp/$_electron_zip" "$_cache_dir"
+
Expand Down