Skip to content

Commit

Permalink
fix podman version output to include git commit and builttime
Browse files Browse the repository at this point in the history
Add the go module version v2 to the libpod path.

Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
  • Loading branch information
Luap99 authored and mheon committed Aug 20, 2020
1 parent b5b782f commit d3ef477
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ else
BUILD_INFO ?= $(shell date "+$(DATE_FMT)")
ISODATE ?= $(shell date --iso-8601)
endif
LIBPOD := ${PROJECT}/libpod
LIBPOD := ${PROJECT}/v2/libpod
GCFLAGS ?= all=-trimpath=${PWD}
ASMFLAGS ?= all=-trimpath=${PWD}
LDFLAGS_PODMAN ?= \
Expand Down
7 changes: 7 additions & 0 deletions test/system/001-basic.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ function setup() {
is "${lines[0]}" "Version:[ ]\+[1-9][0-9.]\+" "Version line 1"
is "$output" ".*Go Version: \+" "'Go Version' in output"
is "$output" ".*API Version: \+" "API version in output"

# Test that build date is reasonable, e.g. after 2019-01-01
local built=$(expr "$output" : ".*Built: \+\(.*\)" | head -n1)
local built_t=$(date --date="$built" +%s)
if [ $built_t -lt 1546300800 ]; then
die "Preposterous 'Built' time in podman version: '$built'"
fi
}


Expand Down

0 comments on commit d3ef477

Please sign in to comment.