def update_deb_command(): import email.utils import time changelog_entry_template = """mapproxy (%(version)s) unstable; urgency=low * New upstream release. -- %(user)s <%(email)s> %(time)s """ with open('debian/changelog') as f: old_changelog = f.read() changelog = changelog_entry_template % { 'version': version(), 'user': backtick_('git config --get user.name').strip(), 'email': backtick_('git config --get user.email').strip(), 'time': email.utils.formatdate(time.time(), True), } changelog += old_changelog with open('debian/changelog', 'w') as f: f.write(changelog)
def update_deb_command(): import email.utils import time changelog_entry_template = """mapproxy (%(version)s) unstable; urgency=low * New upstream release. -- %(user)s <%(email)s> %(time)s """ with open("debian/changelog") as f: old_changelog = f.read() changelog = changelog_entry_template % { "version": version(), "user": backtick_("git config --get user.name").strip(), "email": backtick_("git config --get user.email").strip(), "time": email.utils.formatdate(time.time(), True), } changelog += old_changelog with open("debian/changelog", "w") as f: f.write(changelog)
def version(): package_name = PACKAGE_NAME version = backtick_('grep Version: %(package_name)s.egg-info/PKG-INFO' % locals()) version = version.split(':')[-1].strip() return version
def upload_test_sdist_command(): date = backtick_('date +%Y%m%d').strip() print( 'python setup.py egg_info -R -D -b ".dev%s" register -r testpypi sdist upload -r testpypi' % (date, ))
def upload_test_sdist_command(): date = backtick_("date +%Y%m%d").strip() print ('python setup.py egg_info -R -D -b ".dev%s" register -r testpypi sdist upload -r testpypi' % (date,))