mirror of
https://github.com/clearlinux/common.git
synced 2026-10-03 23:38:20 +00:00
Always clean rpms and logs from previous builds
I often find myself running "make clean proper", when by default, I think the old build artifacts should be removed so that the results directory is pristine at the start of a new build. As a result, if users wish to keep all build artifacts from a previous "make build" or "make autospec", they must keep manual backups, as the tooling no longer keeps them around. Signed-off-by: Patrick McCarty <patrick.mccarty@intel.com>
This commit is contained in:
+2
-3
@@ -115,7 +115,7 @@ shell:
|
||||
|
||||
# Always rebuild the source rpm
|
||||
.PHONY: $(SRPMFILE)
|
||||
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice
|
||||
$(SRPMFILE): $(SPECFILE) $(__allsources) localreponotice clean-old-content
|
||||
@$(MAKE) spdxcheck
|
||||
$(MOCK) --buildsrpm --source=./ --spec=$(SPECFILE) --result=results/ --no-cleanup-after --uniqueext=$(PKG_NAME)
|
||||
mv results/root.log results/srpm-root.log
|
||||
@@ -156,8 +156,7 @@ pullrebase:
|
||||
#help Use MOCK_OPTS environment varible to pass down arbitrary mock options
|
||||
#help to autospec.
|
||||
#help For more information, see the project at https://github.com/clearlinux/autospec
|
||||
autospec: pullrebase localreponotice
|
||||
rm -f results/*src.rpm
|
||||
autospec: pullrebase localreponotice clean-old-content
|
||||
@if [ -e $(SPECFILE) ] && ! grep -q "# Generated by: autospec.py" $(SPECFILE) ; then \
|
||||
echo "Specfile already exists and was not created by autospec.py! Aborting."; \
|
||||
exit 1; \
|
||||
|
||||
@@ -138,6 +138,17 @@ localreponotice:
|
||||
[ -f $(TOPLVL)/repo/opt-in-build ] || sleep 3; \
|
||||
fi >&2
|
||||
|
||||
.PHONY: clean-old-rpms clean-old-logs clean-old-content
|
||||
clean-old-rpms:
|
||||
rm -rf ./rpms
|
||||
rm -f ./results/*.rpm
|
||||
|
||||
clean-old-logs:
|
||||
rm -f ./results/*.log
|
||||
|
||||
clean-old-content: clean-old-rpms clean-old-logs
|
||||
|
||||
|
||||
.PHONY: help
|
||||
##### Code
|
||||
# Make sure that HELPSPACE has exactly HELPLEN spaces in it
|
||||
|
||||
Reference in New Issue
Block a user