github aquaproj/aqua v0.7.2

latest releases: v2.36.1, v2.36.0, v2.36.0-1...
3 years ago

Milestone
v0.7.1...v0.7.2

Feature

#21 #314 Support changing package metadata per version
#298 #311 Parse templates when it is needed
#292 #294 Add aqua's version in outputs
#296 Add validations of the Configuration

Support changing package metadata per version

Some package attributes like asset and files may be different by it's version.
For example, the asset structure of golang-migrate was changed from v4.15.0.
In that case, the attributes version_constraint and version_overrides are useful.

e.g.

- type: github_release
  repo_owner: golang-migrate
  repo_name: migrate
  asset: 'migrate.{{.OS}}-{{.Arch}}.tar.gz'
  description: Database migrations. CLI and Golang library
  version_constraint: 'semver("> 4.14.1")'
  version_overrides:
  - version_constraint: 'semver("<= 4.14.1")'
    files:
    - name: migrate
      src: 'migrate.{{.OS}}-{{.Arch}}'

version_constraint is expr's expression.
The evaluation result must be a boolean.

Currently, the following values and functions are accessible in the expression.

  • version: (type: string) The package version
  • semver: (type: func(string) bool) Tests if the package version satisfies all the constraints. hashicorp/go-version is used

version_overrides

The list of version override.

The following attributes are supported.

  • version_constraint
  • files
  • format
  • format_overrides
  • replacements
  • asset
  • url

e.g.

  version_overrides:
  - version_constraint: 'semver("<= 4.14.1")'
    files:
    - name: migrate
      src: 'migrate.{{.OS}}-{{.Arch}}'

Document

#286 Update document about Configuration
#300 Update document
#306 Add int128/aqua-action to the section Install

Test

#308 #310 Update Integration tests
#299 #303 #305 #307 Add Unit tests

Don't miss a new aqua release

NewReleases is sending notifications on new releases.