mirror of
https://github.com/fergalmoran/picard.git
synced 2025-12-22 09:18:18 +00:00
PICARD-1065: Fix patch_version
This commit is contained in:
4
setup.py
4
setup.py
@@ -585,9 +585,9 @@ class picard_patch_version(Command):
|
||||
def patch_version(self, filename):
|
||||
regex = re.compile(r'^PICARD_BUILD_VERSION_STR\s*=.*$', re.MULTILINE)
|
||||
with open(filename, 'r+b') as f:
|
||||
source = f.read()
|
||||
source = (f.read()).decode()
|
||||
build = self.platform + '_' + datetime.datetime.utcnow().strftime('%Y%m%d%H%M%S')
|
||||
patched_source = regex.sub('PICARD_BUILD_VERSION_STR = "%s"' % build, source)
|
||||
patched_source = regex.sub('PICARD_BUILD_VERSION_STR = "%s"' % build, source).encode()
|
||||
f.seek(0)
|
||||
f.write(patched_source)
|
||||
f.truncate()
|
||||
|
||||
Reference in New Issue
Block a user