main: Make ostree --version output YAML (and add gitrev)

I learned today that `docker version` does this and I really like
the idea.  While we have the patient open, also add the gitrev
with code taken from https://github.com/projectatomic/rpm-ostree/pull/584

Closes: #691
Approved by: giuseppe
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-02-22 18:57:18 +00:00
1 parent 3ec509c89b
commit 09b392675a
7 files changed
+30 -10

No files matched your search

+5 -1
View File
@@ -19,7 +19,11 @@
set -euo pipefail
echo "1..61"
echo "1..62"
$CMD_PREFIX ostree --version > version.yaml
python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
echo "ok yaml version"
$OSTREE checkout test2 checkout-test2
echo "ok checkout"
+1
View File
@@ -110,6 +110,7 @@ case "$ci_distro" in
libcurl4-openssl-dev \
procps \
zlib1g-dev \
python-yaml \
${NULL}
if [ "$ci_in_docker" = yes ]; then
+4 -1
View File
@@ -538,7 +538,10 @@ skip_without_fuse () {
}
has_gpgme () {
${CMD_PREFIX} ostree --version | grep -q -e '\+gpgme'
${CMD_PREFIX} ostree --version > version.txt
assert_file_has_content version.txt '- gpgme'
rm -f version.txt
true
}
libtest_cleanup_gpg () {
+1 -1
View File
@@ -19,7 +19,7 @@
set -euo pipefail
if ! ostree --version | grep -q -e '\+libarchive'; then
if ! ostree --version | grep -q -e '- libarchive'; then
echo "1..0 #SKIP no libarchive support compiled in"
exit 0
fi