github aquaproj/aqua v1.7.0

latest releases: v2.37.2, v2.37.1, v2.37.0...
2 years ago

Pull Requests | Issues | v1.6.3...v1.7.0

Features

#798 #799 Support building Go tool to install

New package type go has been added.
The repository archive is downloaded from GitHub and the package is built by command go build when it is installed.
So the command go is required.
aqua is a CLI Version Manager, you have to specify the version. Unlike go install command, you can't specify the head of the default branch.

e.g. https://github.com/google/wire

registry.yaml

packages:
  - type: go
    repo_owner: google
    repo_name: wire
    description: Compile-time Dependency Injection for Go
    files:
      - name: wire
        src: ./cmd/wire
        dir: "wire-{{trimV .Version}}"

aqua.yaml

registries:
  - name: local
    type: local
    path: registry.yaml
packages:
  - name: google/wire@v0.5.0
    registry: local
$ aqua which wire
/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/go/github.com/google/wire/v0.5.0/bin/wire

$ aqua install
INFO[0000] create a symbolic link                        aqua_version= env=darwin/arm64 link_file=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/bin/wire new=aqua-proxy package_name=google/wire package_version=v0.5.0 program=aqua registry=standard
INFO[0000] download and unarchive the package            aqua_version= env=darwin/arm64 package_name=google/wire package_version=v0.5.0 program=aqua registry=standard
INFO[0001] building Go tool                              aqua_version= env=darwin/arm64 exe_path=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/go/github.com/google/wire/v0.5.0/bin/wire file_name=wire go_build_dir=/Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/go/github.com/google/wire/v0.5.0/src/wire-0.5.0 go_src=./cmd/wire package_name=google/wire package_version=v0.5.0 program=aqua registry=standard

File parameter

    files:
      - name: wire
        src: ./cmd/wire
        dir: "wire-{{trimV .Version}}"
  • name: command name
  • dir: Directory path where go build is run
  • src: go build's target path
${AQUA_ROOT_DIR}/pkgs/go/github.com/google/wire/v0.5.0/
  bin/wire
  src/ # GitHub Repository Archive
    wire-0.5.0/ # `go build` is run on this directory
      cmd/wire # build target

The following command is run.

$ go build -o "${AQUA_ROOT_DIR}/pkgs/go/github.com/google/wire/v0.5.0/bin/wire" "./cmd/wire"

Don't miss a new aqua release

NewReleases is sending notifications on new releases.