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: Resolve version before checking arch #24

Merged
merged 3 commits into from
Feb 9, 2024
Merged
Changes from 1 commit
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
16 changes: 8 additions & 8 deletions gimme
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,14 @@ if [[ -n "${2}" ]]; then
GIMME_VERSION_PREFIX="${2}"
fi

case "${GIMME_GO_VERSION}" in
stable) GIMME_GO_VERSION=$(_get_curr_stable) ;;
oldstable) GIMME_GO_VERSION=$(_get_old_stable) ;;
module) GIMME_GO_VERSION=$(_resolve_version module) ;;
esac

_assert_version_given "$@"

case "${GIMME_ARCH}" in
x86_64) GIMME_ARCH=amd64 ;;
x86) GIMME_ARCH=386 ;;
Expand All @@ -927,14 +935,6 @@ arm64) ;;
arm*) GIMME_HOSTARCH=arm ;;
esac

case "${GIMME_GO_VERSION}" in
stable) GIMME_GO_VERSION=$(_get_curr_stable) ;;
oldstable) GIMME_GO_VERSION=$(_get_old_stable) ;;
module) GIMME_GO_VERSION=$(_resolve_version module) ;;
esac

_assert_version_given "$@"

((force_install)) && _wipe_version "${GIMME_GO_VERSION}"

unset GOARCH
Expand Down
Loading