4877887e49
For some reason, the VM would sometimes take a very long time to reboot after deploying the new commit. Adding a sync before rebooting fixes this, though I'm not sure why the filesystem doesn't sync itself as fast without it. Closes: #371 Approved by: cgwalters
18 lines
299 B
Bash
18 lines
299 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
|
|
sync
|