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
cbe17571
Commit
cbe17571
authored
Mar 13, 2016
by
LE GAC Renaud
Browse files
Add the option --foce-container to build_version.
parent
c273c51e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
37 deletions
+48
-37
build_version.py
build_version.py
+48
-37
No files found.
build_version.py
View file @
cbe17571
...
...
@@ -16,7 +16,7 @@
The documentation is build using sphinx-build and jsduck while
the javascript minimisation is perform by senchaCmd. These command
can be install on the local host or run via a docker container.
can be install
ed
on the local host or run via a docker container.
The latter is useful when running in the development area.
EXAMPLES
...
...
@@ -34,7 +34,6 @@ import datetime
import
os
import
re
import
sys
import
tempfile
from
glob
import
glob
...
...
@@ -684,12 +683,13 @@ def which(cmd):
"""
# local host
# try:
# out = check_output(["which", cmd])
# return [out.strip("\n")]
#
# except CalledProcessError:
# print "\n\tCommand", cmd, "not found on the localhost"
if
not
ARGS
.
force_container
:
try
:
out
=
check_output
([
"which"
,
cmd
])
return
[
out
.
strip
(
"
\n
"
)]
except
CalledProcessError
:
print
"
\n\t
Command"
,
cmd
,
"not found on the localhost"
# docker container is running ?
container
=
ARGS
.
docker_container
...
...
@@ -703,6 +703,8 @@ def which(cmd):
if
not
is_running
:
print
"
\n\t
Docker container"
,
container
,
"is not running !"
if
ARGS
.
force_container
:
sys
.
exit
(
1
)
return
[]
# docker container
...
...
@@ -739,20 +741,51 @@ if __name__ == '__main__':
APS
.
add_argument
(
"-C"
,
"--commit-changelog"
,
action
=
"store_true"
,
help
=
"commit
CHANGELOG
. "
help
=
"commit
changes in changelog and version files
. "
"To be used with --write-release. "
"Recommend to use --start-release."
)
APS
.
add_argument
(
"-d"
,
"--docker-container"
,
default
=
"dev"
,
help
=
"docker container housing jsduck, sencha and sphinx "
"commands [%(default)s]. The container has to ran."
,
"commands [%(default)s]. The container has to ran. "
"See also --force-container."
,
metavar
=
"<name>"
)
APS
.
add_argument
(
"-f"
,
"--force-container"
,
action
=
"store_true"
,
help
=
"third party commands (jsduck, sencha and sphinx ) "
"are run via the docker container although they are "
"install on the local host. The default is to look "
"for the commands on the local host and then on the "
"container. See also --docker-container."
)
APS
.
add_argument
(
"-j"
,
"--jsduck"
,
action
=
"store_true"
,
help
=
"build the JavaScript documentation."
)
APS
.
add_argument
(
"--plugins"
,
nargs
=
"+"
,
help
=
"plugins to be installed. To be used with "
"--plugin-release and --plugin-git or --plugin-tar."
" Possible values are ace, dbui, extjs and mathjax."
,
metavar
=
"<plugin>"
)
APS
.
add_argument
(
"--plugins-git"
,
default
=
"../plugin_dbui_build"
,
help
=
"git repository containing plugins [%(default)s]."
,
metavar
=
"<path>"
)
APS
.
add_argument
(
"--plugins-release"
,
default
=
"latest"
,
help
=
"release number for plugin [%(default)s]. "
"To be used with --plugin-git."
,
metavar
=
"<release>"
)
APS
.
add_argument
(
"--plugins-tar"
,
help
=
"tar file containing the plugins"
,
metavar
=
"<path>"
)
APS
.
add_argument
(
"-r"
,
"--reference-doc"
,
action
=
"store_true"
,
help
=
"build the reference manual in HTML."
)
...
...
@@ -765,9 +798,9 @@ if __name__ == '__main__':
action
=
"store_true"
,
help
=
"start the new release cycle. "
"Set the release number in the changelog and "
"c
ommit changes in the master branch. "
"Equivalent to --write-release followed by "
"--commit-changelog."
)
"version file. C
ommit changes in the master branch. "
"Equivalent to --write-release followed by "
"--commit-changelog."
)
APS
.
add_argument
(
"-u"
,
"--user-doc"
,
action
=
"store_true"
,
...
...
@@ -783,32 +816,10 @@ if __name__ == '__main__':
APS
.
add_argument
(
"-w"
,
"--write-release"
,
action
=
"store_true"
,
help
=
"write the release number in
CHANGELOG and VERSION.
"
"To be used with --commit-changelog. "
help
=
"write the release number in
changelog and version
"
"
files.
To be used with --commit-changelog. "
"Recommend to use --start-release."
)
APS
.
add_argument
(
"--plugins"
,
nargs
=
"+"
,
help
=
"plugins to be installed. To be used with "
"--plugin-release and --plugin-git or --plugin-tar."
" Possible values are ace, dbui, extjs and mathjax."
,
metavar
=
"<plugin>"
)
APS
.
add_argument
(
"--plugins-release"
,
default
=
"latest"
,
help
=
"release number for plugin [%(default)s]. "
"To be used with --plugin-git."
,
metavar
=
"<release>"
)
APS
.
add_argument
(
"--plugins-git"
,
default
=
"../plugin_dbui_build"
,
help
=
"git repository containing plugins [%(default)s]."
,
metavar
=
"<path>"
)
APS
.
add_argument
(
"--plugins-tar"
,
help
=
"tar file containing the plugins"
,
metavar
=
"<path>"
)
ARGS
=
APS
.
parse_args
()
if
ARGS
.
api_doc
:
...
...
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