1
0
mirror of https://github.com/gryf/wicd.git synced 2025-12-19 12:28:08 +01:00

Added support for storing the revision number in wpath.py

This commit is contained in:
Adam Blackburn
2008-12-30 10:16:09 -06:00
parent b0ef6a905b
commit bc584bfa3f
2 changed files with 15 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ current = os.path.dirname(os.path.realpath(__file__)) + '/'
# All directory paths *MUST* end in a /
version = '%VERSION%'
revision = '%REVNO%'
# DIRECTORIES

View File

@@ -24,6 +24,18 @@ import sys
# Be sure to keep this updated!
# VERSIONNUMBER
VERSION_NUM = '1.6.0'
REVISON_NUM = 'unknown'
try:
if not os.exists('vcsinfo.py'):
try:
os.system('bzr version-info --python > vcsinfo.py')
except:
pass
import vcsinfo
REVISION_NUM = vcsinfo.version_info['revno']
except:
print 'failed to find revision number'
class configure(Command):
description = "configure the paths that Wicd will be installed to"
@@ -214,7 +226,9 @@ class configure(Command):
for item, value in values:
line = line.replace('%' + str(item.upper().replace('-','_')) + '%', str(value))
# other things to replace that aren't arguments
line = line.replace('%VERSION%', str(VERSION_NUM))
line = line.replace('%REVNO%', str(REVISION_NUM))
item_out.write(line)