github aquaproj/aqua v2.11.0

latest releases: v2.28.1, v2.28.0, v2.28.0-1...
8 months ago

Pull Requests | Issues | v2.10.1...v2.11.0

Features

#538 #2249 Support uninstalling packages
#2131 #2065 Support go_build package

Support uninstalling packages

#538 #2249

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

#2039 #2131 #2065

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.

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.

https://github.com/suzuki-shunsuke/github-comment/blob/e5fd429b4d1bd84e8b825a2c7b693d6ac570022f/go.mod#L1

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

Others

#2151 #2163 #2227 Update Go 1.20.6 to 1.21.1

Don't miss a new aqua release

NewReleases is sending notifications on new releases.