github aquaproj/aqua v2.13.0

latest releases: v2.37.2, v2.37.1, v2.37.0...
13 months ago

Pull Requests | Issues | v2.12.2...v2.13.0

This release includes several improvement of Registry settings.
This updates affect Registry developers including aqua-registry's contributors.
There is no direct change for almost all aqua users.

To keep the compatibility and minimize the effect to users, we won't use new features in aqua-registry for at least one month after v2.13.0 is released.
If we apply new features to existing packages of aqua-registry, this requires a major update of aqua-registry because this is a breaking change.

Features

#2318 #2320 Add a new field envs to overrides instead of goos and goarch
#2132 #2317 Support using go_install or go_build if the platform isn't included in supported_envs
#1774 #2314 Support omitting .{{.Format}} in asset and url
#1876 #2313 Support short file extensions in format
#1774 #2310 Add the template variable AssetWithoutExt to files[].src

Add a new field envs to overrides instead of goos and goarch

#2318 #2320

Add a new field envs to overrides.
The syntax of envs is same with supported_envs.

The syntax of envs is more flexible than the combination of goos and goarch.
In some cases we can simplify the code.

For example, the combination of goos and goarch can't express the pair of linux/arm64 and windows/arm64.

overrides:
  - goos: windows
    goarch: arm64
    # ...
  - goos: linux
    goarch: arm64
    # ...

envs can simplify the code.

overrides:
  - envs:
      - windows/arm64
      - linux/arm64
    # ...

Support using go_install or go_build if the platform isn't included in supported_envs

#2132 #2317

A new field build is added to Registry settings.
This enables to install packages by go_install or go_build on platforms where prebuilt binaries aren't published.

This is an example usage of the new field build.

packages:
  - type: github_release
    repo_owner: suzuki-shunsuke
    repo_name: tfcmt
    asset: tfcmt_{{.OS}}_{{.Arch}}.{{.Format}}
    format: tar.gz
    supported_envs:
      - linux
    build:
      type: go_build
      files:
        - name: tfcmt
          src: ./cmd/tfcmt
          dir: tfcmt-{{trimV .Version}}

supported_envs is linux, so on platforms other than linux aqua installs tfcmt by go_build.

go_install is also available.

    build:
      type: go_install
      path: github.com/suzuki-shunsuke/tfcmt/v4/cmd/tfcmt

If go_build failed on windows/arm64 and you'd like to exclude windows/arm64, excluded_envs is available.

    build:
      type: go_build
      excluded_envs:
        - windows/arm64
      files:
        - name: tfcmt
          src: ./cmd/tfcmt
          dir: tfcmt-{{trimV .Version}}

If you'd like to disable build in version_overrides, enabled is available.

build:
  enabled: false

Why not overrides?

Of course, we can do the same thing with overrides.
But build makes the intension of the code clear and simplify the code.

Support omitting .{{.Format}} in asset and url

#1774 #2314

The file extension is complemented if it isn't included in asset and url.

e.g.

asset: foo # This is same with `foo.tar.gz` and `foo.{{.Format}}`
format: tar.gz

The benefit is that you can unify the setting of raw format and non raw format.

Before

asset: kalker-{{.OS}}.{{.Format}}
format: zip
overrides:
  - goos: linux
    format: raw
    asset: kalker-{{.OS}}

After

asset: kalker-{{.OS}}
format: zip
overrides:
  - goos: linux
    format: raw

You can disable the complementation by setting append_ext: false.

append_ext: false

Support short file extensions in format

#1876 #2313

The following short file extensions can be available in format.

  • tbr
  • tbz
  • tbz2
  • tgz
  • tlz4
  • tsz
  • txz

e.g.

format: tbz2

Add the template variable AssetWithoutExt to files[].src

#1774 #2310

The new template variable AssetWithoutExt is a string that a file extension is removed from Asset.

e.g.

    asset: aks-engine-{{.Version}}-{{.OS}}-{{.Arch}}.tar.gz
    files:
      - name: aks-engine
        src: "{{.AssetWithoutExt}}/aks-engine" # "{{.AssetWithoutExt}}" == "aks-engine-{{.Version}}-{{.OS}}-{{.Arch}}"

Don't miss a new aqua release

NewReleases is sending notifications on new releases.