Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
ce3f3048
Commit
ce3f3048
authored
Feb 18, 2004
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script to help with building releases
parent
c7accfe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
release.py
release.py
+55
-0
No files found.
release.py
0 → 100644
View file @
ce3f3048
#! /usr/bin/env python
"""Update version numbers and release dates for the next release.
usage: release.py version date
version should be a string like "3.2c1"
date should be a string like "23-Sep-2003"
The following files are updated:
- setup.py gets a version number
"""
import
fileinput
import
os
import
re
def
fixpath
(
path
):
parts
=
path
.
split
(
"/"
)
return
os
.
sep
.
join
(
parts
)
def
replace
(
filename
,
pat
,
repl
):
parts
=
filename
.
split
(
"/"
)
filename
=
os
.
sep
.
join
(
parts
)
for
line
in
fileinput
.
input
([
filename
],
inplace
=
True
,
backup
=
"~"
):
print
re
.
sub
(
pat
,
repl
,
line
),
def
compute_zeoversion
(
version
):
# ZEO version's trail ZODB versions by one full revision.
# ZODB 3.2c1 corresponds to ZEO 2.2c1
major
,
rest
=
version
.
split
(
"."
,
1
)
major
=
int
(
major
)
-
1
return
"%s.%s"
%
(
major
,
rest
)
def
write_zeoversion
(
path
,
version
):
f
=
open
(
fixpath
(
path
),
"wb"
)
print
>>
f
,
version
f
.
close
()
def
main
(
args
):
version
,
date
=
args
zeoversion
=
compute_zeoversion
(
version
)
replace
(
"src/setup.py"
,
'version="
\
S+
"
'
,
'version="%s"'
%
version
)
replace
(
"src/README.txt"
,
"'
\
d+
\
.
\
d+[
a
-z]?
\
d*
'
"
,
"'%s'"
%
version
)
replace
(
"src/ZODB/__init__.py"
,
"__version__ = '
\
S+
'
"
,
"__version__ = '%s'"
%
version
)
replace
(
"src/ZEO/__init__.py"
,
'version = "
\
S+
"
'
,
'version = "%s"'
%
zeoversion
)
write_zeoversion
(
"src/ZEO/version.txt"
,
zeoversion
)
replace
(
"src/NEWS.txt"
,
"Release date: XX-
\
S+-
\
S+"
,
"Release date: %s"
%
date
)
if
__name__
==
"__main__"
:
import
sys
main
(
sys
.
argv
[
1
:])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment