Skip to content

feat(asdf): update install script to install the go binary when version is newer 0.16.0#80

Open
marcel-dias wants to merge 2 commits intodevcontainer-community:mainfrom
marcel-dias:asdf-go-binary
Open

feat(asdf): update install script to install the go binary when version is newer 0.16.0#80
marcel-dias wants to merge 2 commits intodevcontainer-community:mainfrom
marcel-dias:asdf-go-binary

Conversation

@marcel-dias
Copy link

feat(asdf): update install script to install the go binary when version is newer 0.16.0

This pull request refactors the installation logic for asdf-vm in the src/asdf-vm.com/install.sh script to better support both legacy and binary installation methods, depending on the version. It also improves OS and architecture detection and updates the way the latest release version is fetched from GitHub.

Installation logic improvements:

  • Split the installation process into two distinct functions: install_legacy for legacy git-based installs (<= 0.16.0) and install_binary for newer binary releases (> 0.16.0), with automatic selection based on the requested version.
  • Added helper functions detect_os and detect_arch to reliably determine the operating system and architecture for binary downloads.
  • Introduced the version_lte function to compare semantic versions and select the appropriate installation method.

GitHub release handling:

  • Removed the github_list_releases function and updated github_get_latest_release to use the GitHub API’s /releases/latest endpoint for more accurate release detection.

Shell configuration updates:

  • Ensured that the correct paths are added to the user's .bashrc file for both installation methods.

…on is newer 0.16.0

Signed-off-by: Marcel Dias <marcel.dias@camunda.com>
Signed-off-by: Marcel Dias <marcel.dias@camunda.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant