Pull Requests | Issues | v2.10.1...v2.11.0
Features
#538 #2249 Support uninstalling packages
#2131 #2065 Support go_build
package
Support uninstalling packages
Add a subcommand rm
to uninstall packages
Usage
$ aqua rm --all [-a] # Uninstall all packages
$ aqua rm [<registry name>,]<package name> [...] # Uninstall packages
Example
$ aqua rm -a
$ aqua rm cli/cli direnv/direnv
⚠️ Limitation
The following package types can't be removed without --all
option.
http
go_install
Support go_build
package
The new package type go_build
has been supported.
Example
packages:
- type: go_build
repo_owner: suzuki-shunsuke
repo_name: github-comment
files:
- name: github-comment
src: ./cmd/github-comment
dir: github-comment-{{trimV .Version}}
$AQUA_ROOT_DIR/pkgs/go_build/github.com/suzuki-shunsuke/github-comment/v4.0.0/
bin/
github-comment
src/github-comment-4.0.0/
cmd/github-comment/main.go
...
Why is the feature needed?
Because some packages couldn't be installed by go install
but could be installed by go build
.
aqua ever supported go
type package, but it was abandoned at aqua v2 because we thought we could replace it to go_install
type package.
- https://aquaproj.github.io/docs/reference/registry-config/go-package
- https://aquaproj.github.io/docs/reference/upgrade-guide/v2/remove-type-go
But we found that some packages couldn't be installed by go install
but could be installed by go build
.
For example, suzuki-shunsuke/github-comment v5 can't be installed by go install
.
$ go install github.com/suzuki-shunsuke/github-comment/v5/cmd/github-comment@v5.2.1
go: github.com/suzuki-shunsuke/github-comment/v5/cmd/github-comment@v5.2.1: github.com/suzuki-shunsuke/github-comment@v5.2.1: invalid version: module contains a go.mod file, so module path must match major version ("github.com/suzuki-shunsuke/github-comment/v5")
$ go install github.com/suzuki-shunsuke/github-comment/cmd/github-comment@v5.2.1
go: github.com/suzuki-shunsuke/github-comment/cmd/github-comment@v5.2.1: github.com/suzuki-shunsuke/github-comment@v5.2.1: invalid version: module contains a go.mod file, so module path must match major version ("github.com/suzuki-shunsuke/github-comment/v5")
This is because github-comment's go.mod was wrong.
module github.com/suzuki-shunsuke/github-comment
This issue was solved by github-comment v6, but github-comment v2 ~ v5 can't still be installed by go install
.
There are many Go tools that can't be installed by go install
.
Bug Fixes
#2120 Fix the default checksum parser to support a tab character as separator
#2147 Use the basename of the package name as the default command name
#2176 generate-registry: Fix the format of .tar.zst
#2202 generate-registry: Remove empty error_message
#2215 fix a log field version_constraint