gunnar: server/make-helper pear.mk,1.8,1.9
cvs at kolab.org
cvs at kolab.org
Tue Feb 16 09:17:34 CET 2010
Author: gunnar
Update of /kolabrepository/server/make-helper
In directory doto:/tmp/cvs-serv9036
Modified Files:
pear.mk
Log Message:
Improve the git checkout technique and only pull the repository once.
Index: pear.mk
===================================================================
RCS file: /kolabrepository/server/make-helper/pear.mk,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- pear.mk 9 Feb 2010 10:17:39 -0000 1.8
+++ pear.mk 16 Feb 2010 08:17:32 -0000 1.9
@@ -39,7 +39,7 @@
REPO = $(shell grep "^repo=" package.info | sed -e "s/repo='\([A-Za-z0-9_\-]*\)'.*/\1/")
# Determine the exact commit that should be retrieved from the repository
-COMMIT = $(shell grep "^repo_commit=" package.info | sed -e "s/repo_commit='\([A-Za-z0-9_:]*\)'.*/\1/")
+COMMIT = $(shell grep "^repo_commit=" package.info | sed -e "s/repo_commit='\([A-Za-z0-9_:]*\)'.*/\1/")
SAFE_COMMIT = $(shell grep "^repo_commit=" package.info | sed -e "s/repo_commit=':*\([A-Za-z0-9_]*\)'.*/\1/")
# Determine the release tag a package derived from a repository checkout should get
@@ -158,9 +158,13 @@
cd "$(UPSTREAM)/$(SAFE_COMMIT)/$(CVS_REPO)" && $(CVS_REPO_SC_CMD) "$(COMMIT)"
else
ifeq ($(PACKAGE_VC),GIT)
-$(UPSTREAM)/$(SAFE_COMMIT)/$(GIT_REPO)/$(PEAR_PKGDIR): $(UPSTREAM)/$(SAFE_COMMIT)
- -cd "$(UPSTREAM)/$(SAFE_COMMIT)" && $(GIT_REPO_CO_CMD) $(GIT_REPO_URL)
- cd "$(UPSTREAM)/$(SAFE_COMMIT)/$(GIT_REPO)" && $(GIT_REPO_SC_CMD) "$(COMMIT)"
+$(UPSTREAM)/$(GIT_REPO):
+ cd "$(UPSTREAM)" && $(GIT_REPO_CO_CMD) $(GIT_REPO_URL)
+
+$(UPSTREAM)/.$(GIT_REPO)-commit_$(COMMIT): $(UPSTREAM)/$(GIT_REPO)
+ cd "$(UPSTREAM)/$(GIT_REPO)" && $(GIT_REPO_SC_CMD) "$(COMMIT)"
+ rm -f $(UPSTREAM)/.$(GIT_REPO)-commit_*
+ touch $@
endif
endif
@@ -172,10 +176,10 @@
cp -r "$(UPSTREAM)/$(SAFE_COMMIT)/$(CVS_REPO)/$(PEAR_PKGDIR)" tmp/$(PACKAGE)
else
ifeq ($(PACKAGE_VC),GIT)
-tmp/$(PACKAGE): $(UPSTREAM)/$(SAFE_COMMIT)/$(GIT_REPO)/$(PEAR_PKGDIR)
+tmp/$(PACKAGE): $(UPSTREAM)/.$(GIT_REPO)-commit_$(COMMIT)
rm -rf tmp
mkdir tmp
- cp -r "$(UPSTREAM)/$(SAFE_COMMIT)/$(GIT_REPO)/$(PEAR_PKGDIR)" tmp/$(PACKAGE)
+ cp -r "$(UPSTREAM)/$(GIT_REPO)/$(PEAR_PKGDIR)" tmp/$(PACKAGE)
endif
endif
More information about the commits
mailing list