mirror of
https://github.com/outbackdingo/parodus.git
synced 2026-01-28 02:20:02 +00:00
27 lines
615 B
Python
Executable File
27 lines
615 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
from core_admin_common import command
|
|
import sys
|
|
|
|
(status, info) = command.run ("LANG=C svn update . | grep 'At revision'")
|
|
if status:
|
|
print "ERROR: unable to get subversion version: %s" % info
|
|
sys.exit (-1)
|
|
|
|
# get versision
|
|
revision = info.split (" ")[2].replace (".", "").strip ()
|
|
print "INFO: Revision found: %s" % revision
|
|
|
|
version = open ("VERSION").read ().split (".b")[0].strip ()
|
|
version = "%s.b%s" % (version, revision)
|
|
print "INFO: Updated vesion to: %s" % version
|
|
|
|
open ("VERSION", "w").write ("%s\n" % version)
|
|
|
|
# also update Changelog
|
|
command.run ("svn log > Changelog")
|
|
|
|
|
|
|
|
|