コード例 #1
0
ファイル: build.py プロジェクト: summatusmentis/wq.app
 def setversion(self, directory=None, conf=None):
     if directory is None:
         directory = self.indir
     if conf is None:
         conf = self.conf.get('setversion', {})
     if self.version != '':
         conf['version'] = self.version
     self.version = setversion(conf, directory)
コード例 #2
0
ファイル: prepare_release.py プロジェクト: msGenDev/brian2
import os

import brian2

from setversion import setversion, setreleasedate
# Ask for version number
print('Current version is: ' + brian2.__version__)
version = raw_input('Enter new Brian2 version number: ').strip()

# Set the version numbers
print 'Changing to new version', version
setversion(version)
setreleasedate()
print 'Done'

# generate the default preferences file
base, _ = os.path.split(brian2.__file__)
fname = os.path.join(base, 'default_preferences')
open(fname, 'w').write(brian2.brian_prefs.as_file)

# commit
os.system('git commit -a -v -m "***** Release Brian2 %s *****"' % version)
# add tag
os.system('git tag -a -m "Release Brian2 %s" %s' % (version, version))

# print commands necessary for pushing
print('Review the last commit: ')
os.system('git show %s' % version)
print('')
print('To push, using the following command:')
print('git push --tags origin master')