Makefile: Don't clobber an existing bots checkout

Commit 4643afa58 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.

Stop making "bots" a phony target, and drop the now unnecessary
`[ -d bots ]` check.

Adapted from https://github.com/cockpit-project/starter-kit/pull/232
This commit is contained in:
Martin Pitt 2019-10-14 14:35:25 +02:00 committed by Martin Pitt
parent 697233c14a
commit 29c308ae73

View File

@ -173,14 +173,10 @@ vm-reset:
# 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 \ 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
.PHONY: ci_after_success .PHONY: ci_after_success
ci_after_success: ci_after_success:
# nothing to do here, but Jenkins expects this to be present, otherwise fails # nothing to do here, but Jenkins expects this to be present, otherwise fails
.PHONY: docs check test srpm vm vm-reset bots .PHONY: docs check test srpm vm vm-reset