vmcheck: clean before building and adapt to new json

If the dir that was rsync'ed already contains build artifacts, we don't
want those contaminating our build process.

Closes: #336
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2016-06-20 15:44:46 -04:00 committed by Atomic Bot
parent 2c7013e86f
commit 38c8040879
2 changed files with 4 additions and 2 deletions

View File

@ -11,7 +11,7 @@ buildimg:
build:
$(BUILDER_RUN) ./autogen.sh --prefix=/usr --libdir=/usr/lib64
$(BUILDER_RUN) make -j 4
$(BUILDER_RUN) sh -c 'make clean && make -j 4'
install: build
sudo sh checkout.sh

View File

@ -3,7 +3,9 @@ set -euo pipefail
# ugly but simple way of fetching commit we're sitting on
commit=$(rpm-ostree status --json | \
python -c 'import sys, json; print json.load(sys.stdin)[0]["checksum"]')
python -c '
import sys, json;
print json.load(sys.stdin)["deployments"][0]["checksum"]')
if [[ -z $commit ]] || ! ostree rev-parse $commit; then
echo "Error while determining current commit" >&2