Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devflow
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
itminedu
devflow
Commits
7316df0e
Commit
7316df0e
authored
12 years ago
by
Christos Stavrakakis
Browse files
Options
Downloads
Patches
Plain Diff
Add help paragraph
parent
09f7b4e0
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
devflow/autopkg.py
+37
-4
37 additions, 4 deletions
devflow/autopkg.py
with
37 additions
and
4 deletions
devflow/autopkg.py
+
37
−
4
View file @
7316df0e
...
...
@@ -72,11 +72,38 @@ def get_packages_to_build(toplevel_dir):
f
.
close
()
return
l
DESCRIPTION
=
"""
Tool for automatical build of debian packages.
%(prog)s is a helper script for automatic build of debian packages from
repositories that follow the `git flow` development model
<http://nvie.com/posts/a-successful-git-branching-model/>.
This script must run from the toplevel directory of a clean git repository and
will perform the following steps:
* Clone your repository to a temporary directory
* Merge the current branch with the corresponding debian branch
* Compute the version of the new package and update the python
version files
* Create a new entry in debian/changelog, using `git-dch`
* Create the debian packages, using `git-buildpackage`
* Tag the appropriate branches if in `release` mode
"""
def
print_help
(
prog
):
print
DESCRIPTION
%
{
"
prog
"
:
prog
}
def
main
():
from
devflow.version
import
__version__
parser
=
OptionParser
(
usage
=
"
usage: %prog [options] mode
"
,
version
=
"
devflow %s
"
%
__version__
)
version
=
"
devflow %s
"
%
__version__
,
add_help_option
=
False
)
parser
.
add_option
(
"
-h
"
,
"
--help
"
,
action
=
"
store_true
"
,
default
=
False
,
help
=
"
show this help message
"
)
parser
.
add_option
(
"
-k
"
,
"
--keep-repo
"
,
action
=
"
store_true
"
,
dest
=
"
keep_repo
"
,
...
...
@@ -98,6 +125,11 @@ def main():
(
options
,
args
)
=
parser
.
parse_args
()
if
options
.
help
:
print_help
(
parser
.
get_prog_name
())
parser
.
print_help
()
return
try
:
mode
=
args
[
0
]
except
IndexError
:
...
...
@@ -150,8 +182,8 @@ def main():
debian_branch
=
BRANCH_TYPES
[
btypestr
].
default_debian_branch
except
KeyError
:
allowed_branches
=
"
,
"
.
join
(
x
for
x
in
BRANCH_TYPES
.
keys
())
raise
ValueError
(
"
Malformed branch name
'
%s
'
, cannot classify as
one
"
"
of %s
"
%
(
btypestr
,
allowed_branches
))
raise
ValueError
(
"
Malformed branch name
'
%s
'
, cannot classify as
"
"
one
of %s
"
%
(
btypestr
,
allowed_branches
))
origin_debian
=
"
origin/
"
+
debian_branch
repo
.
git
.
branch
(
"
--track
"
,
debian_branch
,
origin_debian
)
...
...
@@ -166,7 +198,8 @@ def main():
cd
(
repo_dir
)
python_version
=
versioning
.
get_python_version
()
debian_version
=
versioning
.
debian_version_from_python_version
(
python_version
)
debian_version
=
versioning
.
\
debian_version_from_python_version
(
python_version
)
print_green
(
"
The new debian version will be:
'
%s
'"
%
debian_version
)
dch
=
git_dch
(
"
--debian-branch=%s
"
%
debian_branch
,
...
...
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