Support installing packages by go build
#2039
-
Feature OverviewSupport installing packages by Why is the feature needed?Because some packages couldn't be installed by aqua ever supported
But we found that some packages couldn't be installed by For example, suzuki-shunsuke/github-comment v5 can't be installed by $ 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.
This issue was solved by github-comment v6, but github-comment v2 ~ v5 can't still be installed by There are many Go tools that can't be installed by Does the feature include Breaking Changes?No. Example CodeThere are two options.
Reference |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Examplepackages:
- type: github_release
repo_owner: suzuki-shunsuke
repo_name: github-comment
asset: github-comment_{{trimV .Version}}_{{.OS}}_{{.Arch}}.tar.gz
version_constraint: semver(">= 6.0.0")
go_path: github.com/suzuki-shunsuke/github-comment/{{.Major}}/cmd/github-comment
version_overrides:
- version_constraint: semver("< 6.0.0")
go_build:
files:
- name: github-comment
src: ./cmd/github-comment
dir: github-comment-{{trimV .Version}} |
Beta Was this translation helpful? Give feedback.
-
Moved to #2131 |
Beta Was this translation helpful? Give feedback.
Moved to #2131