Use template to generate file with __version__

Fix #252
This commit is contained in:
Jakub Kadlcik 2020-04-18 18:49:42 +02:00
parent f71033d7ce
commit 2c61072cdc
3 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Copyright (c) 2008-2009 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.
# WARNING: This file is generated from a tito template, do not edit it directly!
"""
Infrastructure for building Spacewalk and Satellite packages from git tags.
"""
__version__ = '$version'

View file

@ -8,3 +8,7 @@ disttag = el5
[tag2]
disttag = el5
[version_template]
destination_file = src/tito/__init__.py
template_file = .tito/templates/__init__.py.tpl

View file

@ -10,6 +10,13 @@
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.
# WARNING: This file is generated from a tito template, do not edit it directly!
"""
Infrastructure for building Spacewalk and Satellite packages from git tags.
"""
__version__ = '0.6.13'