Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
limbra
limbra
Commits
c273c51e
Commit
c273c51e
authored
Mar 13, 2016
by
LE GAC Renaud
Browse files
Polish build_version message.
parent
bf1c400c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
21 deletions
+23
-21
build_version.py
build_version.py
+23
-21
No files found.
build_version.py
View file @
c273c51e
...
...
@@ -138,7 +138,7 @@ def build_html():
myapp/docs/user
"""
print
"Build the HTML documentations..."
print
"
\n\t
Build the HTML documentations..."
jsduck
()
...
...
@@ -153,7 +153,7 @@ def build_pdf(doc):
doc (str): sub-directory. Possible values are api, reference, user.
"""
print
"Build the PDF documentations..."
print
"
\n\t
Build the PDF documentations..."
if
not
which
(
"pdflatex"
):
print
'
\n\t
The application pdflatex is missing !'
...
...
@@ -204,6 +204,7 @@ def build_pdf(doc):
os
.
rename
(
opj
(
latexdir
,
fpdf
),
opj
(
PDFDOC
,
fout
))
# remove the latex directory
print
"
\n\t
Remove"
,
latexdir
call
([
"rm"
,
"-rf"
,
latexdir
])
print
"
\t
PDF file"
,
opj
(
PDFDOC
,
fout
)
...
...
@@ -213,17 +214,17 @@ def change_log():
"""Commit CHANGELOG and VERSION files
"""
print
"Commit CHANGELOG..."
print
"
\n\t
Commit CHANGELOG..."
if
not
which
(
"git"
):
print
'
\n\t
The application git is missing !'
print
'
\t
Skip this step.
\n
'
return
# Commit modified files
print
'git add'
,
CHANGELOG
,
VERSION
print
'
\t
git add'
,
CHANGELOG
,
VERSION
git
(
"add"
,
CHANGELOG
,
VERSION
)
print
'git commit'
print
'
\t
git commit'
msg
=
"Start release %s"
%
get_version
()
git
(
"commit -m"
,
msg
)
...
...
@@ -251,7 +252,7 @@ def compile_js():
http://docs.sencha.com/extjs/4.2.2/#!/guide/command
"""
print
"Compile the javascript code ..."
print
"
\n\t
Compile the javascript code ..."
sencha
=
which
(
"sencha"
)
if
len
(
sencha
)
==
0
:
...
...
@@ -388,7 +389,7 @@ def install_plugin_git(repository, plugin, release):
release (str): release number for plugins.
"""
print
"
\n
Install plugin"
,
plugin
print
"
\n
\t
Install plugin"
,
plugin
# delete existing version
for
path
in
glob
(
"./*/plugin_%s*"
%
plugin
):
...
...
@@ -483,7 +484,7 @@ def jsduck():
The HTML files are located in static/plugin_dbui/docs/jsduck
"""
print
"Build the javascript documentation..."
print
"
\n\t
Build the javascript documentation..."
cmd
=
which
(
"jsduck"
)
if
len
(
cmd
)
==
0
:
...
...
@@ -492,11 +493,11 @@ def jsduck():
return
if
not
os
.
path
.
exists
(
JSLIBSRC
):
print
'
\n\t
No javascript library. Exit.'
print
'
\n\t
No javascript library. Exit.
\n
'
return
# clean
print
"
\n\t
Remove old javascript documentation..."
print
"
\n\t
Remove old javascript documentation...
\n
"
call
([
"rm"
,
"-rf"
,
JSDOC
])
# NOTE
...
...
@@ -540,7 +541,7 @@ def set_version(version):
version (str): release identifier
"""
print
"Update CHANGELOG with
the
release"
,
version
,
"..."
print
"
\n\t
Update CHANGELOG
/ VERSION
with release"
,
version
,
"..."
# check tag in git
if
version
in
check_output
([
"git"
,
"tag"
]):
...
...
@@ -600,7 +601,7 @@ def sphinx(builder, doc):
doc (str): possible value are api, reference, user
"""
print
"
\n
Build"
,
builder
,
"documentation for"
,
doc
,
"...
\n
"
print
"
\n
\t
Build"
,
builder
,
"documentation for"
,
doc
,
"...
\n
"
cmd
=
which
(
"sphinx-build"
)
if
len
(
cmd
)
==
0
:
...
...
@@ -654,12 +655,12 @@ def start_release():
"""Start the release cycle.
"""
print
"Start the release cycle..."
print
"
\n\t
Start the release cycle..."
git
(
"checkout"
,
"master"
)
old_release
=
get_version
()
print
"Current release is"
,
old_release
print
"
\t
Current release is"
,
old_release
new_release
=
raw_input
(
MSG_RELEASE
)
if
not
new_release
:
...
...
@@ -683,12 +684,12 @@ def which(cmd):
"""
# local host
try
:
out
=
check_output
([
"which"
,
cmd
])
return
[
out
.
strip
(
"
\n
"
)]
except
CalledProcessError
:
print
"
\n\t
Command"
,
cmd
,
"not found on the localhost"
#
try:
#
out = check_output(["which", cmd])
#
return [out.strip("\n")]
#
#
except CalledProcessError:
#
print "\n\tCommand", cmd, "not found on the localhost"
# docker container is running ?
container
=
ARGS
.
docker_container
...
...
@@ -696,7 +697,7 @@ def which(cmd):
for
line
in
check_output
([
"docker"
,
"ps"
]).
split
(
"
\n
"
):
li
=
line
.
split
()
if
li
[
-
1
]
==
container
:
if
len
(
li
)
and
li
[
-
1
]
==
container
:
is_running
=
True
break
...
...
@@ -852,4 +853,5 @@ if __name__ == '__main__':
if
ARGS
.
version
:
print
"
\n
The current release is %s
\n
"
%
get_version
()
print
sys
.
exit
(
0
)
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