knative / hack

Knative common scripts.
Apache License 2.0
18 stars 64 forks source link

Collect project tags for build testing in robust way #219

Closed cardil closed 2 years ago

cardil commented 2 years ago

Currently, we collect the tags using complicated Bash scripts. It's done in a couple of places, making it hard to maintain:

  1. https://github.com/knative/actions/blob/a07cee3faf135520010959a17be98c8652d58cb5/.github/workflows/go-build.yaml#L50-L58
  2. https://github.com/knative/hack/blob/664eac5c391eb4ee29693f71c0107138ad00e88d/presubmit-tests.sh#L142-L150

Also, the old tag syntax +build, we use, will eventually go away, and new syntax isn't so easy to parse with bash.

Another idea would be to read the tags from .golangci.yaml if it's defined in repository (see: This is currently done with a config file for our linter - https://github.com/knative/serving/blob/3446ca3f8d523d41774c555fafef7b05c319a4ac/.golangci.yaml#L4-L6).

cardil commented 2 years ago

Done in: