diff --git a/deb/common/rules b/deb/common/rules index 51700aa583..0d312a910e 100755 --- a/deb/common/rules +++ b/deb/common/rules @@ -30,14 +30,17 @@ override_dh_auto_build: override_dh_auto_test: ver="$$(engine/bundles/dynbinary-daemon/dockerd --version)"; \ - test "$$ver" = "Docker version $(VERSION), build $(ENGINE_GITCOMMIT)" && echo "PASS: daemon version OK" || echo "FAIL: daemon version ($$ver) did not match" + test "$$ver" = "Docker version $(VERSION), build $(ENGINE_GITCOMMIT)" && echo "PASS: daemon version OK" || (echo "FAIL: daemon version ($$ver) did not match" && exit 1) ver="$$(cli/build/docker --version)"; \ - test "$$ver" = "Docker version $(VERSION), build $(CLI_GITCOMMIT)" && echo "PASS: cli version OK" || echo "FAIL: cli version ($$ver) did not match" + test "$$ver" = "Docker version $(VERSION), build $(CLI_GITCOMMIT)" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($$ver) did not match" && exit 1) # FIXME: --version currently doesn't work as it makes a connection to the daemon, so using the plugin metadata instead - ver="$$(/usr/libexec/docker/cli-plugins/docker-scan docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \ - test "$$ver" = "$(SCAN_VERSION)" && echo "PASS: docker-scan version OK" || echo "FAIL: docker-scan version ($$ver) did not match" + # TODO change once we support scan-plugin on other architectures + if [ "$(TARGET_ARCH)" = "amd64" ]; then \ + ver="$$(/usr/libexec/docker/cli-plugins/docker-scan docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $$1 == "Version" { print $$2 }')"; \ + test "$$ver" = "$(SCAN_VERSION)" && echo "PASS: docker-scan version OK" || (echo "FAIL: docker-scan version ($$ver) did not match" && exit 1); \ + fi override_dh_strip: # Go has lots of problems with stripping, so just don't diff --git a/rpm/SPECS/docker-ce-cli.spec b/rpm/SPECS/docker-ce-cli.spec index a83b71b115..078a002e54 100644 --- a/rpm/SPECS/docker-ce-cli.spec +++ b/rpm/SPECS/docker-ce-cli.spec @@ -66,7 +66,7 @@ popd %check ver="$(cli/build/docker --version)"; \ - test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_cli}" && echo "PASS: cli version OK" || echo "FAIL: cli version ($ver) did not match" + test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_cli}" && echo "PASS: cli version OK" || (echo "FAIL: cli version ($ver) did not match" && exit 1) %install # install binary diff --git a/rpm/SPECS/docker-ce.spec b/rpm/SPECS/docker-ce.spec index 8d537d4d3b..71d924a9ee 100644 --- a/rpm/SPECS/docker-ce.spec +++ b/rpm/SPECS/docker-ce.spec @@ -86,7 +86,7 @@ popd %check ver="$(engine/bundles/dynbinary-daemon/dockerd --version)"; \ - test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_engine}" && echo "PASS: daemon version OK" || echo "FAIL: daemon version ($ver) did not match" + test "$ver" = "Docker version %{_origversion}, build %{_gitcommit_engine}" && echo "PASS: daemon version OK" || (echo "FAIL: daemon version ($ver) did not match" && exit 1) %install install -D -p -m 0755 $(readlink -f engine/bundles/dynbinary-daemon/dockerd) ${RPM_BUILD_ROOT}%{_bindir}/dockerd diff --git a/rpm/SPECS/docker-scan-plugin.spec b/rpm/SPECS/docker-scan-plugin.spec index 44a8ed6d32..eaf66738f9 100644 --- a/rpm/SPECS/docker-scan-plugin.spec +++ b/rpm/SPECS/docker-scan-plugin.spec @@ -34,7 +34,7 @@ popd # FIXME: --version currently doesn't work as it makes a connection to the daemon, so using the plugin metadata instead #${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-scan scan --accept-license --version ver="$(${RPM_BUILD_ROOT}%{_libexecdir}/docker/cli-plugins/docker-scan docker-cli-plugin-metadata | awk '{ gsub(/[",:]/,"")}; $1 == "Version" { print $2 }')"; \ - test "$ver" = "%{_scan_version}" && echo "PASS: docker-scan version OK" || echo "FAIL: docker-scan version ($ver) did not match" + test "$ver" = "%{_scan_version}" && echo "PASS: docker-scan version OK" || (echo "FAIL: docker-scan version ($ver) did not match" && exit 1) %install pushd ${RPM_BUILD_DIR}/src/scan-cli-plugin