rpm-ostree/tests/vmcheck/commit_and_deploy.sh
Jonathan Lebon 816194cd58 Makefile-tests: add toplevel vm* targets
The `make vmshell` target makes it even easier to immediately try out
your changes in a live running Atomic Host. It will automatically
provision the VM, sync your latest changes, build, install in a new
deployment onto which the VM is rebooted, and drop you in the shell.

Closes: #321
Approved by: cgwalters
2016-06-15 13:38:34 +00:00

17 lines
294 B
Bash

#!/bin/bash
set -euo pipefail
cd /ostree/repo/tmp
umount vmcheck.ro
cmd="ostree commit -b vmcheck -s '' \
--tree=dir=vmcheck \
--link-checkout-speedup"
if [ -n "${VERSION:-}" ]; then
cmd="$cmd --add-metadata-string=version=$VERSION"
fi
eval $cmd
ostree admin deploy vmcheck