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 --- hack/get_release_info.sh | 70 ------------------------------------------------ 1 file changed, 70 deletions(-) delete mode 100755 hack/get_release_info.sh (limited to 'hack') diff --git a/hack/get_release_info.sh b/hack/get_release_info.sh deleted file mode 100755 index e1020e677..000000000 --- a/hack/get_release_info.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash - -# This script produces various bits of metadata needed by Makefile. Using -# a script allows uniform behavior across multiple environments and -# distributions. The script expects a single argument, as reflected below. - -set -euo pipefail - -cd "${GOSRC:-$(dirname $0)/../}" - -valid_args() { - REGEX='^\s+[[:upper:]]+\*[)]' - egrep --text --no-filename --group-separator=' ' --only-matching "$REGEX" "$0" | \ - cut -d '*' -f 1 -} - -# `git describe` will never produce a useful version number under all -# branches. This is because the podman release process (see `RELEASE_PROCESS.md`) -# tags release versions only on release-branches (i.e. never on main). -# Scraping the version number directly from the source, is the only way -# to reliably obtain the number from all the various contexts supported by -# the `Makefile`. -scrape_version() { - local v - # extract the value of 'var Version' - v=$(sed -ne 's/^var\s\+Version\s\+=\s.*("\(.*\)").*/\1/p' /dev/stderr - exit 2 -fi -- cgit v1.2.3-54-g00ecf