use python3 for build, reomve bzr version, fall back to date without git
This commit is contained in:
parent
43393af132
commit
c4a91f46ed
1 changed files with 6 additions and 6 deletions
|
@ -1,11 +1,10 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#vim: et:ts=4:sw=4:sts=4
|
#vim: et:ts=4:sw=4:sts=4
|
||||||
from __future__ import print_function
|
|
||||||
|
|
||||||
|
import datetime
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import ox
|
|
||||||
import re
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
@ -13,6 +12,9 @@ import sys
|
||||||
import tarfile
|
import tarfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import ox
|
||||||
|
|
||||||
|
|
||||||
def get_version():
|
def get_version():
|
||||||
if os.path.exists('../../.git'):
|
if os.path.exists('../../.git'):
|
||||||
revision = subprocess.Popen(
|
revision = subprocess.Popen(
|
||||||
|
@ -20,9 +22,7 @@ def get_version():
|
||||||
).communicate()[0].strip().decode('utf-8')
|
).communicate()[0].strip().decode('utf-8')
|
||||||
revision = int(revision) - 94
|
revision = int(revision) - 94
|
||||||
else:
|
else:
|
||||||
revision = subprocess.Popen(
|
revision = 'x+' + datetime.datetime.now().strftime('%Y%m%d%H%M')
|
||||||
['bzr', 'revno'], stdout=subprocess.PIPE
|
|
||||||
).communicate()[0].strip().decode('utf-8')
|
|
||||||
return '0.1.%s' % revision
|
return '0.1.%s' % revision
|
||||||
|
|
||||||
def build_oxjs(downloads=False, geo=False):
|
def build_oxjs(downloads=False, geo=False):
|
||||||
|
|
Loading…
Reference in a new issue