From 34043bd81d3c7a84e8be0a69a6b1c3f55d752a21 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Thu, 16 Sep 2021 16:15:28 -0400 Subject: 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 --- test/version/main.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/version/main.go (limited to 'test/version') 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()) +} -- cgit v1.2.3-54-g00ecf