Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.extension
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
bob
bob.extension
Commits
f4a28e0e
Commit
f4a28e0e
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Fixed exception message
parent
a74a5f29
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/extension/scripts/new_version.py
+1
-1
1 addition, 1 deletion
bob/extension/scripts/new_version.py
bob/extension/test_scripts.py
+4
-2
4 additions, 2 deletions
bob/extension/test_scripts.py
with
5 additions
and
3 deletions
bob/extension/scripts/new_version.py
+
1
−
1
View file @
f4a28e0e
...
@@ -47,7 +47,7 @@ def main(command_line_options = None):
...
@@ -47,7 +47,7 @@ def main(command_line_options = None):
# assert the the version file is there
# assert the the version file is there
version_file
=
'
version.txt
'
version_file
=
'
version.txt
'
if
not
os
.
path
.
exists
(
version_file
):
if
not
os
.
path
.
exists
(
version_file
):
raise
ValueError
(
"
Could not find the file
'
%s
'
containing the version number. Are you inside the root directory of your package?
"
)
raise
ValueError
(
"
Could not find the file
'
%s
'
containing the version number. Are you inside the root directory of your package?
"
%
version_file
)
def
run_commands
(
version
,
*
calls
):
def
run_commands
(
version
,
*
calls
):
"""
Updates the version.txt to the given version and runs the given commands.
"""
"""
Updates the version.txt to the given version and runs the given commands.
"""
...
...
This diff is collapsed.
Click to expand it.
bob/extension/test_scripts.py
+
4
−
2
View file @
f4a28e0e
...
@@ -18,10 +18,12 @@ def test_new_version():
...
@@ -18,10 +18,12 @@ def test_new_version():
# test the script using the dry-run option (to avoid to actually tag and push code)
# test the script using the dry-run option (to avoid to actually tag and push code)
# assert that it does not raise an exception, when both latest and stable version are specified
# assert that it does not raise an exception, when both latest and stable version are specified
new_version
([
'
--dry-run
'
,
'
--stable-version
'
,
'
20.7.0
'
,
'
--latest-version
'
,
'
20.8.0
'
])
if
os
.
path
.
exists
(
"
version.txt
"
):
new_version
([
'
--dry-run
'
,
'
--stable-version
'
,
'
20.7.0
'
,
'
--latest-version
'
,
'
20.8.0
'
])
# assert that it does not raise an exception, when only the latest version is specified
# assert that it does not raise an exception, when only the latest version is specified
new_version
([
'
--dry-run
'
,
'
--latest-version
'
,
'
20.8.0
'
])
if
os
.
path
.
exists
(
"
version.txt
"
):
new_version
([
'
--dry-run
'
,
'
--latest-version
'
,
'
20.8.0
'
])
# assert that it does raise an exception, when the latest version is too low
# assert that it does raise an exception, when the latest version is too low
nose
.
tools
.
assert_raises
(
ValueError
,
new_version
,
[
'
--dry-run
'
,
'
--latest-version
'
,
'
0.8.0
'
])
nose
.
tools
.
assert_raises
(
ValueError
,
new_version
,
[
'
--dry-run
'
,
'
--latest-version
'
,
'
0.8.0
'
])
...
...
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