From 6f2eabbfa363c41908c6ec12a06f569f4ee03da9 Mon Sep 17 00:00:00 2001
From: Thibault Cohen <thibault.cohen@savoirfairelinux.com>
Date: Tue, 21 Apr 2015 10:37:26 -0400
Subject: [PATCH] Make release easier

Refs #70831

Change-Id: Ifa85be5be5bf31f08173b224c11688de5367b80e
---
 debian/rules     | 3 ++-
 ring-daemon.spec | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/debian/rules b/debian/rules
index 329bddc39f..3c50a6d216 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,7 @@ PKG  = $(shell dpkg-parsechangelog -l$(PKD)/changelog --show-field=Source)
 VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};')
 DISTRIB_ID = $(shell grep -hPo "^ID=\K.*" /etc/*ease)
 DISTRIB_VERSION_ID = $(shell grep -hPo "^VERSION_ID=\K.*" /etc/*ease)
+DAEMON_TAG = 2.1.0
 
 # Uncomment this to turn on verbose mode.
 export DH_VERBOSE=1
@@ -49,7 +50,7 @@ override_dh_auto_install:
 get-orig-source:
 	# Daemon
 	git fetch --all
-	git merge origin release-2.1.x --no-edit
+	git merge origin $(DAEMON_TAG) --no-edit
 	# Packing
 	@echo "# Packing ... "
 	find . | sort \
diff --git a/ring-daemon.spec b/ring-daemon.spec
index fe503c8cfc..5e47328c9c 100644
--- a/ring-daemon.spec
+++ b/ring-daemon.spec
@@ -1,6 +1,7 @@
 %define name        ring-daemon
 %define version     2.1.0
 %define release     1
+%define daemon_tag  %{version}
 
 Name:               %{name}
 Version:            %{version}
@@ -40,12 +41,12 @@ This is the ring repository
 %prep
 %setup -q
 git init
-git remote add origin https://gerrit-ring.savoirfairelinux.com/ring
+git remote add origin https://gerrit-ring.savoirfairelinux.com/ring-daemon
 git fetch --all
 git checkout packaging-releases -f
 git config user.name "joulupukki"
 git config user.email "joulupukki@localhost"
-git merge origin/release-2.1.x --no-edit
+git merge origin/%{daemon_tag} --no-edit
 # Apply all patches
 for patch_file in $(cat debian/patches/series | grep -v "^#")
 do
-- 
GitLab