mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
rpmdist.mk: Add check_cvs_sync to build-on-version-diff
This commit is contained in:
parent
b80f5c6b6f
commit
f7dd1540f4
1 changed files with 22 additions and 17 deletions
|
|
@ -139,25 +139,29 @@ update-repo.dist: upload.dist
|
|||
|
||||
# ------ hash stuff
|
||||
|
||||
CHECK_CVS_STATUS_BEFORE_INCREASING_BUILD_NUMBER ?= true
|
||||
CHECK_CVS_SYNC_BEFORE_RPM_RELEAS ?= true
|
||||
|
||||
define check_cvs_sync
|
||||
echo + checking cvs ;\
|
||||
cvs status > cvs_status.tmp 2>&1;\
|
||||
if [ $$? != 0 ]; then \
|
||||
cat cvs_status.tmp ;\
|
||||
echo -e "\n======== cvs status failed, giving up." >&2 ;\
|
||||
exit 1 ;\
|
||||
fi ;\
|
||||
if grep -qi "locally modified" cvs_status.tmp; then \
|
||||
echo + cvs copy has locally modified files, giving up >&2 ;\
|
||||
exit 1 ;\
|
||||
fi ;\
|
||||
if grep -qi "needs" cvs_status.tmp; then \
|
||||
echo + cvs copy is out-of-date, giving up >&2 ;\
|
||||
exit 1 ;\
|
||||
fi
|
||||
endef
|
||||
|
||||
define increase_build_number
|
||||
if [ "$(CHECK_CVS_STATUS_BEFORE_INCREASING_BUILD_NUMBER)" = true ]; then \
|
||||
echo + checking cvs ;\
|
||||
cvs status > cvs_status.tmp 2>&1;\
|
||||
if [ $$? != 0 ]; then \
|
||||
cat cvs_status.tmp ;\
|
||||
echo -e "\n======== cvs status failed, giving up." >&2 ;\
|
||||
exit 1 ;\
|
||||
fi ;\
|
||||
if grep -qi "locally modified" cvs_status.tmp; then \
|
||||
echo + tried to increase build number on cvs copy with locally modified files, giving up >&2 ;\
|
||||
exit 1 ;\
|
||||
fi ;\
|
||||
if grep -qi "needs" cvs_status.tmp; then \
|
||||
echo + tried to increase build number on out-of-date cvs copy, giving up >&2 ;\
|
||||
exit 1 ;\
|
||||
fi ;\
|
||||
if [ "$(CHECK_CVS_SYNC_BEFORE_RPM_RELEASE)" = true ]; then \
|
||||
$(check_cvs_sync) ;\
|
||||
fi ;\
|
||||
echo $(MAJOR_MINOR_RELEASE)-$(shell expr $(BUILD_NUMBER) + 1)-dev | tee VERSION ;\
|
||||
echo $(HASH) > HASH ;\
|
||||
|
|
@ -193,6 +197,7 @@ rpm-next-build:
|
|||
|
||||
rpm-release: rpm-update-release
|
||||
@if [ "$(VERSION)" != "$(LAST_RPM_VERSION)" ]; then \
|
||||
$(check_cvs_sync) ;\
|
||||
echo "+ version doesn't match latest released rpm version, building a new release" ;\
|
||||
make update-repo.dist || exit 1;\
|
||||
cp VERSION LAST_RPM_VERSION ;\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue