Makefile: Don't clobber an existing bots checkout

Commit 95b2aff0 was a thinko -- for our CI we *don't* want our test to
clobber a pre-existing bots/ checkout, as we often use this to run tests
against an updated image or to validate a changes to the bots project.

On developer machines, bots may also be a symlink to an actual bots
directory in development, so don't clobber that.

Closes #232
This commit is contained in:
Martin Pitt 2019-10-01 23:00:07 +02:00 committed by Sanne Raymaekers
parent 24311984e8
commit d43845c1a3

View file

@ -136,11 +136,7 @@ check: $(NODE_MODULES_TEST) $(VM_IMAGE) test/common
# checkout Cockpit's bots for standard test VM images and API to launch them # checkout Cockpit's bots for standard test VM images and API to launch them
# must be from master, as only that has current and existing images; but testvm.py API is stable # must be from master, as only that has current and existing images; but testvm.py API is stable
bots: bots:
if [ ! -d bots ]; then \ [ -d bots ] || git clone --depth=1 https://github.com/cockpit-project/bots.git
git clone --depth=1 https://github.com/cockpit-project/bots.git; \
else \
cd bots && git fetch && git reset --hard origin/master; \
fi
# checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag # checkout Cockpit's test API; this has no API stability guarantee, so check out a stable tag
# when you start a new project, use the latest relese, and update it from time to time # when you start a new project, use the latest relese, and update it from time to time