]> review.fuel-infra Code Review - openstack-build/horizon-build.git/commitdiff
Fixed get-vcs-source target.
authorThomas Goirand <thomas@goirand.fr>
Fri, 26 Oct 2012 19:23:06 +0000 (19:23 +0000)
committerThomas Goirand <thomas@goirand.fr>
Fri, 26 Oct 2012 19:23:06 +0000 (19:23 +0000)
Rewritten-From: 1c5be682b144ff6af56d9c71952710594cab7178

trusty/debian/rules

index 1e7e4f4bc9bff86aab88fdcd2a5488369d6109ac..12a6305155d609ef68b2ab6cc14ee71628682ad6 100755 (executable)
@@ -3,6 +3,11 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
+DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p')
+VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//')
+DEBFLAVOR :=$(shell dpkg-parsechangelog | grep -E ^Distribution: | cut -d" " -f2)
+DEBPKGNAME :=$(shell dpkg-parsechangelog | grep -E ^Source: | cut -d" " -f2)
+
 %:
        dh $@ --with python2
 
@@ -45,11 +50,13 @@ override_dh_auto_clean:
        rm -rf $(CURDIR)/openstack_dashboard/openstack_dashboard.egg-info
 
 get-vcs-source:
-       git remote add upstream git://github.com/openstack/horizon.git || true
+       git remote add upstream git://github.com/openstack/$(DEBPKGNAME).git || true
        git fetch upstream
-       git archive --prefix=horizon-2012.1.1/ 2012.1.1 | xz >../horizon_2012.1.1.orig.tar.xz
+       if [ ! -f ../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ] ; then \
+               git archive --prefix=$(DEBPKGNAME)-$(VERSION)/ $(VERSION) | xz >../$(DEBPKGNAME)_$(VERSION).orig.tar.xz ; \
+       fi
        if ! git checkout master ; then \
                echo "No upstream branch: checking out" ; \
                git checkout -b master upstream/master ; \
        fi
-       git checkout debian/unstable
+       git checkout debian/experimental