change VERSION string

use git describe --always to return a 'version number'
This commit is contained in:
Patrick Hurst 2010-08-22 20:07:27 -04:00
parent 949fb36c61
commit d34421bd23
1 changed files with 3 additions and 3 deletions

View File

@ -45,10 +45,10 @@ def onjoin(paraml, conn=None):
@hook.regex(r'^\x01VERSION\x01$')
def version(inp, notice=None):
p = subprocess.Popen(['hg', 'id', '-n'], stdout=subprocess.PIPE)
p = subprocess.Popen(['git', 'describe', '--always'], stdout=subprocess.PIPE)
stdout, _ = p.communicate()
p.wait()
ret = 'r' + stdout[:-2]
notice('\x01VERSION skybot %s - http://bitbucket.org/Scaevolus/'
ret = stdout.strip()
notice('\x01VERSION skybot %s - http://github.com/rmmh/'
'skybot/\x01' % ret)