Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
openstructure
Commits
750b7f2f
Commit
750b7f2f
authored
14 years ago
by
Marco Biasini
Browse files
Options
Downloads
Patches
Plain Diff
added script to bump version
parent
e67796eb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/bump-version.py
+21
-0
21 additions, 0 deletions
scripts/bump-version.py
with
21 additions
and
0 deletions
scripts/bump-version.py
0 → 100755
+
21
−
0
View file @
750b7f2f
#!/usr/bin/env python
import
sys
out
=
[]
version
=
sys
.
argv
[
1
].
split
(
'
.
'
)
if
len
(
version
)
==
2
:
major
,
minor
,
patch
=
(
int
(
version
[
0
]),
int
(
version
[
1
]),
0
)
else
:
major
,
minor
,
patch
=
(
int
(
version
[
0
]),
int
(
version
[
1
]),
int
(
version
[
2
]))
for
line
in
open
(
'
modules/config/version.hh
'
):
if
line
.
startswith
(
'
#define OST_VERSION_MAJOR
'
):
out
.
append
(
'
#define OST_VERSION_MAJOR %d
\n
'
%
major
)
elif
line
.
startswith
(
'
#define OST_VERSION_MINOR
'
):
out
.
append
(
'
#define OST_VERSION_MINOR %d
\n
'
%
minor
)
elif
line
.
startswith
(
'
#define OST_VERSION_PATCH
'
):
out
.
append
(
'
#define OST_VERSION_PATCH %d
\n
'
%
patch
)
elif
line
.
startswith
(
"
#define OST_VERSION_STRING
"
):
out
.
append
(
'
#define OST_VERSION_STRING
"
%d.%d.%d
"
\n
'
%
(
major
,
minor
,
patch
))
else
:
out
.
append
(
line
)
open
(
'
modules/config/version.hh
'
,
'
w
'
).
write
(
''
.
join
(
out
))
\ No newline at end of file
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