Skip to content

Commit

Permalink
Set SOSVERSION during build to ensure it is reported correctly
Browse files Browse the repository at this point in the history
Resolves: bz585942
  • Loading branch information
Adam Stokes authored and bmr-cymru committed Jan 16, 2012
1 parent 3cba334 commit de0f14a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -37,6 +37,7 @@ install:
install -m644 LICENSE README TODO $(DESTDIR)/usr/share/$(NAME)/.
install -m644 $(NAME).conf $(DESTDIR)/etc/$(NAME).conf
install -m644 gpgkeys/rhsupport.pub $(DESTDIR)/usr/share/$(NAME)/.
sed 's/@SOSVERSION@/$(VERSION)/g'<sos/__init__.py.in >sos/__init__.py
for d in $(SUBDIRS); do make DESTDIR=`cd $(DESTDIR); pwd` -C $$d install; [ $$? = 0 ] || exit 1; done
$(NAME)-$(VERSION).tar.gz: clean gpgkey
Expand Down
1 change: 1 addition & 0 deletions sos/__init__.py → sos/__init__.py.in
Expand Up @@ -22,5 +22,6 @@

gettext.bindtextdomain(gettext_app, gettext_dir)

__version__="@SOSVERSION@"
def _sos(msg):
return gettext.dgettext(gettext_app, msg)
2 changes: 1 addition & 1 deletion sos/sosreport.py
Expand Up @@ -46,8 +46,8 @@
from collections import deque

from sos import _sos as _
from sos import __version__

__version__ = 2.1
if os.path.isfile('/etc/fedora-release'):
__distro__ = 'Fedora'
else:
Expand Down

0 comments on commit de0f14a

Please sign in to comment.