Skip to content

Fuabioo/go-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Go Installation and Upgrade Tool πŸš€

A tool for installing or upgrading an existing go installation written in rust πŸ”₯

The only thing this does is follow the steps described at Go Installation. It is definitely not a replacement for a package manager or manual installation. It is intended for developers who enjoy using a Rust tool to install Go.

Installation πŸ“₯

Download the precompiled binary from the releases.

Usage

go-installer

Developing πŸ’»

Note: This tool is originally developed for Linux amd64.

Fetch dependencies:

cargo update

To run for development:

cargo run

To run with specific flags, e.g., to use version 1.23.4 of Go:

cargo run -- --version 1.23.4

Manual QA πŸ§ͺ

Requirements:

  • Docker 🐳
  • Docker Compose πŸ™
  • At least 300MB for the Docker image and the download

We will use an isolated environment to test the tool without affecting the development computer. By default, DEBUG verbose level logging is enabled.

  1. Execute test.sh.
  2. Once inside the Docker container, execute the following commands and take note:
  • Check the current shell profile:
cat /etc/profile
  • Check the binaries currently in the system:
ls /usr/local
  1. Run the installation process:
go-installer --version 1.23.4
  1. Verify that the PATH environment variable includes the Go bin path:
cat /etc/profile
  1. Confirm that the only change in the installation path /usr/local is the addition of the go directory:
ls /usr/local
  1. Re-source the current shell:
source /etc/profile
  1. Check the Go version:
go version

The output should be 1.23.4. 8. Run the upgrade process to a new version:

go-installer --version 1.24.0
  1. Verify that the PATH environment variable still includes the bin path and that the line is not duplicated:
cat /etc/profile
  1. Confirm that the only change in the installation path /usr/local is the presence of the go directory:
ls /usr/local
  1. Check the Go version again, which should now be 1.24.0:
go version

TODO πŸ“

  • Implement a working version of the tool
  • Add a demo to the README.md
  • Ask for confirmation before committing ❓
  • Clean up the code 🧹
  • Automate QA πŸ€–
  • Make shell PATH export configurable πŸ”§
  • Automate the release process πŸš€
  • Build multi-arch binaries πŸ—οΈ
  • Get the latest version automagically πŸͺ„

About

A go programming language installer/upgrader written in rust πŸ¦€

Resources

License

Stars

Watchers

Forks

Packages

No packages published