Include git revision information in the RPMs, so we can have updates
even when the version doesn't change
This commit is contained in:
Родитель
2578afcc77
Коммит
c23665112b
4
Makefile
4
Makefile
|
@ -26,6 +26,8 @@ COVERAGE := coverage
|
|||
PYLINT = $(BIN_DIR)/pylint
|
||||
PKGS = linkdrop
|
||||
|
||||
GIT_DESCRIBE := `git describe | cut -d- -f2-3`
|
||||
|
||||
ifeq ($(TOPSRCDIR),)
|
||||
export TOPSRCDIR = $(shell pwd)
|
||||
endif
|
||||
|
@ -111,7 +113,7 @@ rpm: f1.spec
|
|||
$(PYTHON) setup.py bdist_rpm
|
||||
|
||||
f1.spec: f1.spec.in Makefile tools/makespec
|
||||
tools/makespec $(version)$(tag) linkdrop.egg-info/requires.txt < f1.spec.in > f1.spec
|
||||
tools/makespec $(version)$(tag) linkdrop.egg-info/requires.txt $(GIT_DESCRIBE) < f1.spec.in > f1.spec
|
||||
|
||||
build:
|
||||
$(VIRTUALENV) --no-site-packages --distribute .
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
Name: %{f1_name_prefix}python%{pyver_sys}
|
||||
Version: %%version%%
|
||||
Release: 3%{?dist}
|
||||
Release: 3%%git%%%{?dist}
|
||||
Summary: Share Links Fast.
|
||||
|
||||
Group: Applications/Internet
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
|
||||
use strict;
|
||||
|
||||
# The package version
|
||||
my $version = shift;
|
||||
# The list of requirements
|
||||
my $requires = shift;
|
||||
# The git revision
|
||||
my $git = shift;
|
||||
my ($git_cnt, $git_rev) = split('-', $git);
|
||||
$git = $git_cnt . '.git.' . $git_rev;
|
||||
|
||||
my $prefix = "%{f1_name_prefix}python%{pyver}-";
|
||||
|
||||
|
@ -59,5 +65,6 @@ while (<>) {
|
|||
s/%%version%%/$version/g;
|
||||
s/%%buildrequires%%//g;
|
||||
s/%%requires%%/$requires/g;
|
||||
s/%%git%%/.$git/g;
|
||||
print;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче