Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
1b883fea
Commit
1b883fea
authored
Jan 24, 2013
by
Christos Stavrakakis
Browse files
Assert that os.system commands succeed
parent
fd18e55a
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
1b883fea
...
...
@@ -222,7 +222,7 @@ def main():
if
mode
==
"release"
:
# Commit changelog and update tag branches
os
.
system
(
"vim debian/changelog"
)
call
(
"vim debian/changelog"
)
repo
.
git
.
add
(
"debian/changelog"
)
repo
.
git
.
commit
(
"-s"
,
"-a"
,
m
=
"Bump new upstream version"
)
python_tag
=
python_version
...
...
@@ -251,7 +251,7 @@ def main():
cd
(
"../"
)
# Add version.py files to repo
os
.
system
(
"grep
\"
__version_vcs
\"
-r . -l -I | xargs git add -f"
)
call
(
"grep
\"
__version_vcs
\"
-r . -l -I | xargs git add -f"
)
# Create debian branches
build_dir
=
options
.
build_dir
...
...
@@ -261,9 +261,9 @@ def main():
build_dir
)
cd
(
repo_dir
)
os
.
system
(
"git-buildpackage --git-export-dir=%s --git-upstream-branch=%s"
" --git-debian-branch=%s --git-export=INDEX --git-ignore-new -sa"
%
(
build_dir
,
brnorm
,
debian_branch
))
call
(
"git-buildpackage --git-export-dir=%s --git-upstream-branch=%s"
" --git-debian-branch=%s --git-export=INDEX --git-ignore-new -sa"
%
(
build_dir
,
brnorm
,
debian_branch
))
# Remove cloned repo
if
mode
!=
'release'
and
not
options
.
keep_repo
:
...
...
@@ -312,5 +312,10 @@ def create_temp_directory(suffix):
return
create_dir_cmd
.
stdout
.
strip
()
def
call
(
cmd
):
rc
=
os
.
system
(
cmd
)
if
rc
:
raise
RuntimeError
(
"Command '%s' failed!"
%
rc
)
if
__name__
==
"__main__"
:
sys
.
exit
(
main
())
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