Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
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
ProMod3
Commits
f0c08207
Commit
f0c08207
authored
4 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
Allow to specify OpenStructure base image in bump_version script
parent
0288eced
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
container/Dockerfile
+2
-2
2 additions, 2 deletions
container/Dockerfile
scripts/bump-version.py
+8
-5
8 additions, 5 deletions
scripts/bump-version.py
with
10 additions
and
7 deletions
container/Dockerfile
+
2
−
2
View file @
f0c08207
ARG
OPENSTRUCTURE_
VERSION
="2.0.0-bionic"
ARG
OPENSTRUCTURE_
IMAGE_TAG
="2.0.0-bionic"
FROM
registry.scicore.unibas.ch/schwede/openstructure:${OPENSTRUCTURE_
VERSION
}
FROM
registry.scicore.unibas.ch/schwede/openstructure:${OPENSTRUCTURE_
IMAGE_TAG
}
# ARGUMENTS
# ARGUMENTS
###########
###########
...
...
This diff is collapsed.
Click to expand it.
scripts/bump-version.py
+
8
−
5
View file @
f0c08207
#!/usr/bin/env python
#!/usr/bin/env python
import
sys
import
sys
if
len
(
sys
.
argv
)
<
3
:
if
len
(
sys
.
argv
)
<
4
:
print
(
"
USAGE: python scripts/bump-version.py PM3_VERSION OST_VERSION
"
)
print
(
"
USAGE: python scripts/bump-version.py PM3_VERSION OST_VERSION
OST_DOCKER_IMAGE_TAG
"
)
print
(
"
-> *_VERSION format is MAJOR.MINOR.PATCH (e.g. 1.9.1)
"
)
print
(
"
-> *_VERSION format is MAJOR.MINOR.PATCH (e.g. 1.9.1)
"
)
print
(
"
-> assumption is that git tags will exist for those *_VERSION
"
)
print
(
"
-> assumption is that git tags will exist for those *_VERSION
"
)
print
(
"
-> OST_DOCKER_IMAGE_TAG refers to the image in the OpenStructure
"
)
print
(
"
Docker registry from which the ProMod3 image will bootstrap
"
)
sys
.
exit
(
1
)
sys
.
exit
(
1
)
# split up version number
# split up version number
...
@@ -12,6 +14,7 @@ version_string = sys.argv[1]
...
@@ -12,6 +14,7 @@ version_string = sys.argv[1]
version
=
version_string
.
split
(
'
.
'
)
version
=
version_string
.
split
(
'
.
'
)
major
,
minor
,
patch
=
(
int
(
version
[
0
]),
int
(
version
[
1
]),
int
(
version
[
2
]))
major
,
minor
,
patch
=
(
int
(
version
[
0
]),
int
(
version
[
1
]),
int
(
version
[
2
]))
ost_version_string
=
sys
.
argv
[
2
]
ost_version_string
=
sys
.
argv
[
2
]
ost_docker_image_tag
=
sys
.
argv
[
3
]
# fix CMakeLists
# fix CMakeLists
lines
=
open
(
"
CMakeLists.txt
"
).
readlines
()
lines
=
open
(
"
CMakeLists.txt
"
).
readlines
()
...
@@ -36,8 +39,8 @@ open("CHANGELOG", "w").writelines(lines)
...
@@ -36,8 +39,8 @@ open("CHANGELOG", "w").writelines(lines)
# fix Docker recipe
# fix Docker recipe
lines
=
open
(
"
container/Dockerfile
"
).
readlines
()
lines
=
open
(
"
container/Dockerfile
"
).
readlines
()
for
i
,
line
in
enumerate
(
lines
):
for
i
,
line
in
enumerate
(
lines
):
if
line
.
startswith
(
"
ARG OPENSTRUCTURE_
VERSION
"
):
if
line
.
startswith
(
"
ARG OPENSTRUCTURE_
IMAGE_TAG
"
):
lines
[
i
]
=
'
ARG OPENSTRUCTURE_
VERSION
=
"
%s
"
\n
'
%
ost_
version_strin
g
lines
[
i
]
=
'
ARG OPENSTRUCTURE_
IMAGE_TAG
=
"
%s
"
\n
'
%
ost_
docker_image_ta
g
elif
line
.
startswith
(
"
ARG PROMOD_VERSION
"
):
elif
line
.
startswith
(
"
ARG PROMOD_VERSION
"
):
lines
[
i
]
=
'
ARG PROMOD_VERSION=
"
%s
"
\n
'
%
version_string
lines
[
i
]
=
'
ARG PROMOD_VERSION=
"
%s
"
\n
'
%
version_string
open
(
"
container/Dockerfile
"
,
"
w
"
).
writelines
(
lines
)
open
(
"
container/Dockerfile
"
,
"
w
"
).
writelines
(
lines
)
...
@@ -48,7 +51,7 @@ lines = open(vfile).readlines()
...
@@ -48,7 +51,7 @@ lines = open(vfile).readlines()
for
i
,
line
in
enumerate
(
lines
):
for
i
,
line
in
enumerate
(
lines
):
if
line
.
startswith
(
"
From: registry.scicore.unibas.ch/schwede/promod3:
"
):
if
line
.
startswith
(
"
From: registry.scicore.unibas.ch/schwede/promod3:
"
):
lines
[
i
]
=
'
From: registry.scicore.unibas.ch/schwede/promod3:
'
+
\
lines
[
i
]
=
'
From: registry.scicore.unibas.ch/schwede/promod3:
'
+
\
'
%s
'
%
version_string
'
%s
-OST%s
\n
'
%
(
version_string
,
ost_docker_image_tag
)
break
break
open
(
vfile
,
"
w
"
).
writelines
(
lines
)
open
(
vfile
,
"
w
"
).
writelines
(
lines
)
...
...
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