mirror of
				https://github.com/containers/podman.git
				synced 2025-10-26 02:35:43 +08:00 
			
		
		
		
	fix podman version output to include git commit and builttime
Add the go module version v2 to the libpod path. Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
This commit is contained in:
		
							
								
								
									
										2
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								Makefile
									
									
									
									
									
								
							| @ -62,7 +62,7 @@ else | |||||||
| 	BUILD_INFO ?= $(shell date "+$(DATE_FMT)") | 	BUILD_INFO ?= $(shell date "+$(DATE_FMT)") | ||||||
| 	ISODATE ?= $(shell date --iso-8601) | 	ISODATE ?= $(shell date --iso-8601) | ||||||
| endif | endif | ||||||
| LIBPOD := ${PROJECT}/libpod | LIBPOD := ${PROJECT}/v2/libpod | ||||||
| GCFLAGS ?= all=-trimpath=${PWD} | GCFLAGS ?= all=-trimpath=${PWD} | ||||||
| ASMFLAGS ?= all=-trimpath=${PWD} | ASMFLAGS ?= all=-trimpath=${PWD} | ||||||
| LDFLAGS_PODMAN ?= \ | LDFLAGS_PODMAN ?= \ | ||||||
|  | |||||||
| @ -24,6 +24,13 @@ function setup() { | |||||||
|     is "${lines[0]}" "Version:[ ]\+[1-9][0-9.]\+" "Version line 1" |     is "${lines[0]}" "Version:[ ]\+[1-9][0-9.]\+" "Version line 1" | ||||||
|     is "$output" ".*Go Version: \+"               "'Go Version' in output" |     is "$output" ".*Go Version: \+"               "'Go Version' in output" | ||||||
|     is "$output" ".*API Version: \+"		  "API 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 | ||||||
| } | } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user
	 Paul Holzinger
					Paul Holzinger