move runc version to a separate file for easier consumption

This moves the runc version to build to scripts/setup/runc-version,
which makes it easier for packagers to find the default version
to use.

The RUNC_VERSION environment variable can still be used to override
the version, which can be used (e.g.) to test against different versions
in our CI.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2021-03-10 13:59:17 +01:00
parent 8325ba5d36
commit 79a51cd16a
4 changed files with 10 additions and 7 deletions

View File

@@ -21,8 +21,10 @@
set -eu -o pipefail
function install_runc() {
# When updating RUNC_VERSION, consider updating the runc module in go.mod as well
: "${RUNC_VERSION:=v1.0.0-rc93}"
script_dir="$(cd -- "$(dirname -- "$0")" > /dev/null 2>&1; pwd -P)"
# When updating runc-version, consider updating the runc module in go.mod as well
: "${RUNC_VERSION:=$(cat "${script_dir}/runc-version")}"
TMPROOT=$(mktemp -d)
git clone https://github.com/opencontainers/runc.git "${TMPROOT}"/runc