From 0f6ae2fe12ac7bd4bbacf238ae43714e324e5ad1 Mon Sep 17 00:00:00 2001 From: Jens Lody Date: Fri, 18 Sep 2015 01:36:18 +0200 Subject: [PATCH] Fixed spec-file and update-script to use the checkout-date and not the build-date in the rpm-revision. --- gnome-shell-extension-openweather.spec | 3 ++- update_revision.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gnome-shell-extension-openweather.spec b/gnome-shell-extension-openweather.spec index 03f0590..158bd70 100644 --- a/gnome-shell-extension-openweather.spec +++ b/gnome-shell-extension-openweather.spec @@ -2,11 +2,12 @@ %global uuid openweather-extension@jenslody.de %global github jenslody-gnome-shell-extension-openweather %global checkout git%{git} +%global checkout_date 20150917 Name: gnome-shell-extension-openweather Version: 1 -Release: 0.0.%(date +%Y%m%d)%{checkout}%{?dist} +Release: 0.0.%{checkout_date}%{checkout}%{?dist} Summary: Display weather information from many locations in the world Group: User Interface/Desktops diff --git a/update_revision.sh b/update_revision.sh index 5db081b..85edc2c 100755 --- a/update_revision.sh +++ b/update_revision.sh @@ -66,8 +66,13 @@ COMMIT=`git log -1 --pretty=format:"%h"` echo "Found revision: '${COMMIT}'" -mv ${SPEC_FILE} ${SPEC_FILE}.tmp -sed "1 s/%global git .*/%global git $COMMIT/" < ${SPEC_FILE}.tmp > ${SPEC_FILE} +DATE=`date +%Y%m%d` + +echo "Use checkout-date: '${DATE}'" + +cp ${SPEC_FILE} ${SPEC_FILE}.tmp +sed -i "s/%global git .*/%global git $COMMIT/" ${SPEC_FILE} +sed -i "s/%global checkout_date .*/%global checkout_date $DATE/" ${SPEC_FILE} rpmdev-bumpspec --comment="Fresh git checkout." --userstring="Jens Lody " ${SPEC_FILE}