Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
99f75c9b
Commit
99f75c9b
authored
15 years ago
by
CG Linden
Browse files
Options
Downloads
Patches
Plain Diff
Add support for externally specified revision number (codeticket)
parent
35ae4085
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/update_version_files.py
+17
-2
17 additions, 2 deletions
scripts/update_version_files.py
with
17 additions
and
2 deletions
scripts/update_version_files.py
+
17
−
2
View file @
99f75c9b
...
...
@@ -47,6 +47,9 @@ def usage():
Options:
--version
Specify the version string to replace current version.
--revision
Specify the revision to replace the last digit of the version.
By default, revision is computed from the version control system.
--skip-on-branch
Specify a regular expression against which the current branch
is matched. If it matches, then leave version strings alone.
...
...
@@ -171,12 +174,15 @@ def main():
update_server
=
False
update_viewer
=
False
new_version
=
None
new_revision
=
None
new_viewer_channel
=
None
new_server_channel
=
None
skip_on_branch_re
=
None
for
o
,
a
in
opts
:
if
o
in
(
'
--version
'
):
new_version
=
a
if
o
in
(
'
--revision
'
):
new_revision
=
a
if
o
in
(
'
--skip-on-branch
'
):
skip_on_branch_re
=
re
.
compile
(
a
)
if
o
in
(
'
--channel
'
):
...
...
@@ -243,11 +249,20 @@ def main():
else
:
if
llversion
.
using_svn
():
revision
=
llversion
.
get_svn_revision
()
if
new_revision
:
revision
=
new_revision
else
:
revision
=
llversion
.
get_svn_revision
()
branch
=
llversion
.
get_svn_branch
()
elif
llversion
.
using_hg
():
revision
=
llversion
.
get_hg_changeset
()
if
new_revision
:
revision
=
new_revision
else
:
revision
=
llversion
.
get_hg_changeset
()
branch
=
llversion
.
get_hg_repo
()
elif
new_revision
:
revision
=
new_revision
branch
=
"
unknown
"
else
:
print
>>
sys
.
stderr
,
"
ERROR: could not determine revision and branch
"
return
-
1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment