Skip to content

Commit 0bf051a

Browse files
committed
Sign built packages.
1 parent a47acee commit 0bf051a

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

scripts/make-release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def set_setup_version(version):
112112

113113

114114
def build_and_upload():
115-
Popen([sys.executable, 'setup.py', 'release', 'sdist', 'upload']).wait()
115+
Popen([sys.executable, 'setup.py', 'release', 'sdist', 'upload', '--sign']).wait()
116116

117117

118118
def fail(message, *args):

scripts/set-version.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
def set_filename_version(filename, version_number, pattern):
2+
changed = []
3+
def inject_version(match):
4+
before, old, after = match.groups()
5+
changed.append(True)
6+
return before + version_number + after
7+
with open(filename) as f:
8+
contents = re.sub(r"^(\s*%s\s*=\s*')(.+?)(')(?sm)" % pattern,
9+
inject_version, f.read())
10+
11+
if not changed:
12+
fail('Could not find %s in %s', pattern, filename)
13+
14+
with open(filename, 'w') as f:
15+
f.write(contents)
16+
17+
18+
def set_changelog_version(version):
19+
info('Setting CHANGES version to %s', version)
20+
# TODO this won't work...
21+
set_filename_version('CHANGES', version, 'Version')
22+
23+
def set_init_version(version):
24+
info('Setting __init__.py version to %s', version)
25+
set_filename_version('flask_restless/__init__.py', version, '__version__')
26+
27+
28+
def set_setup_version(version):
29+
info('Setting setup.py version to %s', version)
30+
set_filename_version('setup.py', version, 'version')

0 commit comments

Comments
 (0)