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

fix: Golang install: use "amd64" for "x86_64" #463

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
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: 4 additions & 2 deletions scripts/bundling.bash
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ function _rename_built_xpi() {
function bundle_production_webextension() {
local version && version=$(browsh_version)
local base='https://github.com/browsh-org/browsh/releases/download'
local release_url="$base/v$version/browsh-$version-an.fx.xpi"
local release_url="$base/v$version/browsh-$version.xpi"
echo "Downloading webextension from: $release_url"
local size && size=$(wc -c <"$XPI_PATH")
curl -L -o "$XPI_PATH" "$release_url"
local size && size=$(wc -c <"$XPI_PATH")
if [ "$size" -lt 500 ]; then
echo "XPI size seems too small: $size"
_panic "Problem downloading latest webextension XPI"
fi
cp -a "$XPI_PATH" "$(versioned_xpi_file)"
}
6 changes: 4 additions & 2 deletions scripts/misc.bash
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,12 @@ function install_golang() {
[ "$GOROOT" = "" ] && _panic "GOROOT not set"
GOARCH=$(uname -m)
[[ $GOARCH == aarch64 ]] && GOARCH=arm64
echo "Installing Golang v$version... to $GOROOT"
[[ $GOARCH == x86_64 ]] && GOARCH=amd64
url=https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
echo "Installing Golang ($url)... to $GOROOT"
curl -L \
-o go.tar.gz \
https://dl.google.com/go/go"$version".linux-"$GOARCH".tar.gz
"$url"
mkdir -p "$GOPATH"/bin
mkdir -p "$GOROOT"
tar -C "$GOROOT/.." -xzf go.tar.gz
Expand Down