Skip to content

Commit e42867d

Browse files
committed
Cleanup version generation, set version to devel
1 parent 2bc95d4 commit e42867d

File tree

3 files changed

+13
-21
lines changed

3 files changed

+13
-21
lines changed

VERSION.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

pavement.py

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
ROBOTIDE_PACKAGE = ROOT_DIR/'src'/'robotide'
1919
MANIFEST = ROOT_DIR/'MANIFEST.in'
2020

21-
VERSION = open(ROOT_DIR/'VERSION.txt').read().strip()
22-
FINAL_RELEASE = bool(re.match('^(\d*\.){1,2}\d*$', VERSION))
23-
2421
TEST_PROJECT_DIR = 'theproject'
2522
TEST_LIBS_GENERATED = 10
23+
# Set VERSION global variable
24+
execfile('src/robotide/version.py')
25+
FINAL_RELEASE = bool(re.match('^(\d*\.){1,2}\d*$', VERSION))
2626

2727

2828
def find_packages(where):
@@ -172,12 +172,16 @@ def register():
172172
@task
173173
@consume_args
174174
def set_version(args):
175-
with open('VERSION.txt', 'w') as version_file:
176-
version_file.write(args[0])
175+
version = args[0]
176+
with (path(ROBOTIDE_PACKAGE)/'version.py').open('w') as version_file:
177+
version_file.write("""# Automatically generated by `pavement.py`.
178+
VERSION = '%s'
179+
""" % version)
180+
_log('Set version to %s' % version)
177181

178182

179183
@task
180-
@needs('clean', '_prepare_build', 'release_notes_plugin', 'generate_setup',
184+
@needs('clean', 'release_notes_plugin', 'generate_setup',
181185
'minilib', 'setuptools.command.sdist')
182186
def sdist():
183187
"""Creates source distribution with bundled dependencies"""
@@ -198,11 +202,6 @@ def _windows():
198202
sys.exit('Windows installers may only be created in Windows')
199203

200204

201-
@task
202-
def _prepare_build():
203-
_update_version()
204-
205-
206205
@task
207206
def release_notes_plugin():
208207
changes = _download_and_format_issues()
@@ -215,6 +214,7 @@ def clean():
215214

216215

217216
def _clean(keep_dist=False):
217+
_remove_bytecode_files()
218218
if not keep_dist and DIST_DIR.exists():
219219
DIST_DIR.rmtree()
220220
if BUILD_DIR.exists():
@@ -240,14 +240,6 @@ def _run_nose(args):
240240
argv=['', '--m=^test_'] + args)
241241

242242

243-
def _update_version():
244-
_log('Using version %s from VERSION.txt' % VERSION)
245-
with (path(ROBOTIDE_PACKAGE)/'version.py').open('w') as version_file:
246-
version_file.write("""# Automatically generated by `pavement.py`.
247-
VERSION = '%s'
248-
""" % VERSION)
249-
250-
251243
def _set_development_path():
252244
sys.path.insert(0, SOURCE_DIR)
253245

src/robotide/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# Automatically generated by `pavement.py`.
2-
VERSION = '1.4a1'
2+
VERSION = 'devel'
3+

0 commit comments

Comments
 (0)