diff options
author | Chris Evich <cevich@redhat.com> | 2021-09-16 16:15:28 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2021-09-21 12:29:26 -0400 |
commit | 34043bd81d3c7a84e8be0a69a6b1c3f55d752a21 (patch) | |
tree | ec1302c30273a6e9928d4c0097af3750fbaba0e4 /test | |
parent | d8d494994aba312b21582a4820268ef5f5c15db0 (diff) | |
download | podman-34043bd81d3c7a84e8be0a69a6b1c3f55d752a21.tar.gz podman-34043bd81d3c7a84e8be0a69a6b1c3f55d752a21.tar.bz2 podman-34043bd81d3c7a84e8be0a69a6b1c3f55d752a21.zip |
Fix Error, empty output for info: 'VERSION'
When building releases, the definitive canonical version of podman (or
podman-remote) is needed. Previously this was accomplished by scraping
`version/version.go`. However, due to tooling differences across
platforms, this has proven problematic, unreliable, and hard to
maintain.
Fix this by building and caching a small golang binary who's only purpose
is to print the version number to stdout. This not only provides a quick
and reliable way to determine the current version, it also acts as a check
on the version API vs tooling that relies on it.
Lastly, remove several `RELEASE_*` Makefile definitions which aren't
actually used anywhere. These were originally added a very long time
ago to serve as part of a long since retired release process. The
remaining items, were updated to make use of the new `.podmanversion`
binary on an as-required basis (i.e. not every time `make` is run).
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/version/main.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/version/main.go b/test/version/main.go new file mode 100644 index 000000000..2a751de78 --- /dev/null +++ b/test/version/main.go @@ -0,0 +1,11 @@ +package main + +import ( + "fmt" + + "github.com/containers/podman/v3/version" +) + +func main() { + fmt.Printf(version.Version.String()) +} |