Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
plugin_dbui
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
w2pext
plugin_dbui
Commits
1474d621
Commit
1474d621
authored
9 years ago
by
legac
Browse files
Options
Downloads
Patches
Plain Diff
Redesign build_version in order to generate all documentations and to be compliant with pylint.
parent
1863cd14
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
build_version.py
+584
-0
584 additions, 0 deletions
build_version.py
with
584 additions
and
0 deletions
build
V
ersion.py
→
build
_v
ersion.py
+
584
−
0
View file @
1474d621
...
...
@@ -2,10 +2,10 @@
# -*- coding: utf-8 -*-
"""
NAME
build
V
ersion -- helper script to build and tag a plugin_dbui version
build
_v
ersion -- helper script to build and tag a plugin_dbui version
SYNOPSIS
build
V
ersion [options] version
build
_v
ersion [options] version
DESCRIPTION
Helper script to build a version of the plugin_dbui.
...
...
@@ -21,12 +21,12 @@
EXAMPLES
> build
V
ersion -h
> build
_v
ersion -h
AUTHOR
R. Le Gac, renaud.legac@free.fr
Copyright (c) 2012 R. Le Gac
Copyright (c) 2012
-2015
R. Le Gac
"""
...
...
@@ -43,32 +43,157 @@ from subprocess import call
# constants
APP
=
os
.
path
.
basename
(
os
.
getcwd
())
API
=
'
api
'
BUILDDIR
=
'
../plugin_dbui_build
'
CHANGELOG
=
'
static/plugin_dbui/CHANGELOG
'
DBUI_W2P
=
'
web2py.plugin.dbui.%s.w2p
'
DOCS
=
'
static/plugin_dbui/docs
'
DOCSRC
=
'
docs
'
EXTJSSRC
=
'
static/plugin_extjs/src
'
JSBASE
=
'
static/plugin_dbui/src/App.js
'
JSDOC
=
'
static/plugin_dbui/docs/
jsduck
'
JSDOC
=
os
.
path
.
join
(
DOCS
,
'
jsduck
'
)
JSLIBDEBUG
=
'
static/plugin_dbui/dbui-debug.js
'
JSLIBMIN
=
'
static/plugin_dbui/dbui-min.js
'
JSLIBSRC
=
'
static/plugin_dbui/src
'
SPHINXDOC
=
'
static/plugin_dbui/docs/sphinx
'
SPHINXSRC
=
'
docs/api
'
LATEX
=
'
latex
'
NOW
=
datetime
.
datetime
.
now
()
PACK_PLUGIN_URL
=
'
http://localhost:8000/%s/default/pack_plugin
'
%
APP
PDF
=
"
pdf
"
PDFDOC
=
os
.
path
.
join
(
DOCS
,
PDF
)
REFERENCE
=
'
reference
'
# basic commands
GIT
=
'
/usr/bin/git
'
JSDUCK
=
os
.
path
.
expandvars
(
"
$HOME/bin/jsduck
"
)
PDFLATEX
=
'
/usr/bin/pdflatex
'
SENCHA
=
os
.
path
.
expandvars
(
"
$HOME/bin/sencha
"
)
SPHINX
=
'
/usr/bin/sphinx-build
'
MSG_RELEASE
=
'
Enter the new release:
'
def
compile
():
"""
compile the javascript code and generate the debug version
def
build
():
"""
Compile the javascript code and build documentations.
"""
compile_js
()
build_html
()
build_pdf
()
def
build_html
():
"""
Build HTML documentations
"""
print
"
Build the HTML documentations...
"
jsduck
()
sphinx
(
"
-b html
"
,
os
.
path
.
join
(
DOCSRC
,
API
),
os
.
path
.
join
(
DOCS
,
API
))
sphinx
(
"
-b html
"
,
os
.
path
.
join
(
DOCSRC
,
REFERENCE
),
os
.
path
.
join
(
DOCS
,
REFERENCE
))
def
build_pdf
():
"""
Build PDF documentations...
"""
print
"
Build the PDF documentations...
"
latexdoc
=
os
.
path
.
join
(
DOCS
,
LATEX
)
# generate the latex for the reference manual
sphinx
(
"
-b latex
"
,
os
.
path
.
join
(
DOCSRC
,
REFERENCE
),
latexdoc
)
# the current directory
cwd
=
os
.
getcwd
()
# find the name of the tex file
os
.
chdir
(
latexdoc
)
li
=
[
el
for
el
in
os
.
listdir
(
'
.
'
)
if
el
.
endswith
(
'
.tex
'
)]
fn
=
(
li
[
0
]
if
len
(
li
)
==
1
else
None
)
if
not
fn
:
print
"
\n\t
No latex file !
"
return
# process the latex file twice
cmd
=
[
PDFLATEX
,
"
-output-directory
"
,
os
.
path
.
join
(
"
..
"
,
PDF
),
fn
]
call
(
cmd
)
call
(
cmd
)
# clean the pdf directory
os
.
chdir
(
cwd
)
if
os
.
path
.
exists
(
PDFDOC
):
for
el
in
os
.
listdir
(
PDFDOC
):
if
el
.
endswith
(
'
.pdf
'
):
continue
os
.
remove
(
os
.
path
.
join
(
PDFDOC
,
el
))
# remove the latex directory
call
([
"
rm
"
,
"
-rf
"
,
latexdoc
])
print
"
PDF documentation in
"
,
PDFDOC
def
change_log
():
"""
Commit CHANGELOG and App.js.
"""
print
"
Commit CHANGELOG and App.js...
"
if
not
os
.
path
.
exists
(
GIT
):
print
'
\n\t
The application git is missing !
'
print
'
\t
Skip this step.
\n
'
return
# Commit modified files
print
'
git add
'
,
JSBASE
,
CHANGELOG
git
(
"
add
"
,
JSBASE
,
CHANGELOG
)
print
'
git commit
'
msg
=
"
Start release cycle %s
"
%
get_version
()
git
(
"
commit -m
"
,
msg
)
def
close_release
():
"""
Close the release cycle.
"""
print
"
Close the release cycle...
"
release
=
raw_input
(
"
Select the release:
"
)
if
not
release
:
sys
.
exit
(
0
)
branch
=
"
release-%s
"
%
release
msg
=
"
Release %s
"
%
release
print
msg
git
(
"
checkout develop
"
)
git
(
"
merge --no-ff
"
,
branch
,
"
-m
"
,
msg
)
git
(
"
checkout master
"
)
git
(
"
merge --no-ff
"
,
branch
,
"
-m
"
,
msg
)
git
(
"
tag -a
"
,
release
,
"
-m
"
,
msg
)
rep
=
raw_input
(
"
Destroy branch %s [y/N]:
"
%
branch
)
if
rep
==
"
y
"
:
git
(
"
branch -d
"
,
branch
)
build
()
web2py
()
print
"
The release cycle
"
,
release
,
"
is over
"
def
compile_js
():
"""
compile_js the javascript code and generate the debug version
as well as the minified version of the dbui library.
The compiler verify that the code complied with the class model
...
...
@@ -90,6 +215,7 @@ def compile():
http://docs.sencha.com/extjs/4.2.2/#!/guide/command
"""
print
"
Compile the javascript code ...
"
if
not
os
.
path
.
exists
(
SENCHA
):
print
'
\n\t
The application sencha is missing !
'
print
'
\t
See: http://www.sencha.com/products/sencha-cmd/download
'
...
...
@@ -100,7 +226,7 @@ def compile():
for
el
in
(
JSLIBDEBUG
,
JSLIBMIN
):
if
os
.
path
.
exists
(
el
):
os
.
remove
(
el
)
print
'
r
emove old javascript library
'
,
el
print
'
R
emove old javascript library
'
,
el
# debug version of the javascript library
cwd
=
os
.
getcwd
()
...
...
@@ -112,7 +238,7 @@ def compile():
call
(
cmd
)
print
'
Debug version of the javascript library
'
,
JSLIBDEBUG
print
'
Debug version of the javascript library
'
,
JSLIBDEBUG
,
'
is ready
'
# Minified version of the javascript library
cmd
=
[
"
sencha
"
,
"
-sdk
"
,
os
.
path
.
join
(
cwd
,
EXTJSSRC
),
...
...
@@ -122,21 +248,24 @@ def compile():
call
(
cmd
)
print
'
Minified version of the javascript library
'
,
JSLIBMIN
print
'
Minified version of the javascript library
'
,
JSLIBMIN
,
'
is ready
'
def
get_version
():
"""
Get the current version identifier.
"""
s
=
open
(
JSBASE
,
'
rb
'
).
read
()
m
=
re
.
match
(
"
(.+ version:
'
)([\w._-]*)(
'
.+)
"
,
s
,
re
.
DOTALL
)
return
m
.
group
(
2
)
txt
=
open
(
JSBASE
,
'
rb
'
).
read
()
m
atch
=
re
.
match
(
r
"
(.+ version:
'
)([\w._-]*)(
'
.+)
"
,
txt
,
re
.
DOTALL
)
return
m
atch
.
group
(
2
)
def
git
():
"""
Commit CHANGELOG and App.js.
def
git
(
*
args
,
**
kwargs
):
"""
run any git instruction:
git(
"
add CHANGELOG
"
)
git(
"
add
"
, CHAGELOG,
"
foo.txt
"
)
git(
"
commit
"
, stdout=fi)
"""
if
not
os
.
path
.
exists
(
GIT
):
...
...
@@ -144,25 +273,13 @@ def git():
print
'
\t
Skip this step.
\n
'
return
version
=
get_version
()
# check tag in git
fi
=
tempfile
.
TemporaryFile
()
call
([
"
git
"
,
"
tag
"
],
stdout
=
fi
)
fi
.
seek
(
0
)
if
version
in
fi
.
read
():
print
"
\n\t
tag %s already exit in git
"
%
version
sys
.
exit
(
1
)
cmd
=
[
GIT
]
cmd
.
extend
(
args
[
0
].
split
())
# Commit modified files
print
'
git add
'
,
JSBASE
,
CHANGELOG
cmd
=
[
"
git
"
,
"
add
"
,
JSBASE
,
CHANGELOG
]
call
(
cmd
)
if
len
(
args
)
>
1
:
cmd
.
extend
(
args
[
1
:])
print
'
git commit
'
m
=
"
Start release cycle %s
"
%
version
cmd
=
[
"
git
"
,
"
commit
"
,
"
-m
"
,
m
]
call
(
cmd
)
call
(
cmd
,
**
kwargs
)
def
jsduck
():
...
...
@@ -170,6 +287,7 @@ def jsduck():
The HTML files are located in static/plugin_dbui/docs/jsduck
"""
print
"
Build the javascript documentation...
"
if
not
os
.
path
.
exists
(
JSDUCK
):
print
'
\n\t
The application jsduck is missing !
'
print
'
\t
Skip this step.
\n
'
...
...
@@ -195,45 +313,58 @@ def jsduck():
def
set_version
(
version
):
"""
Set release identifier in CHANGELOG and
a
pp
base
.js
"""
Set release identifier in CHANGELOG and
A
pp.js
"""
print
"
Update CHANGELOG and App.js files with the release
"
,
version
,
"
...
"
# check tag in git
fi
=
tempfile
.
TemporaryFile
()
git
(
"
tag
"
,
stdout
=
fi
)
fi
.
seek
(
0
)
if
version
in
fi
.
read
():
print
"
\n\t
Release %s already exit in git
"
%
version
sys
.
exit
(
1
)
print
'
Set release
'
,
version
,
'
in
'
,
JSBASE
s
=
open
(
JSBASE
,
'
rb
'
).
read
()
txt
=
open
(
JSBASE
,
'
rb
'
).
read
()
# look for a pattern App.version = '0.8.3'; in appbase.js
# split the the string in 3 parts (pre, version, post)
m
=
re
.
match
(
"
(.+ version:
'
)([\w._-]*)(
'
.+)
"
,
s
,
re
.
DOTALL
)
m
atch
=
re
.
match
(
r
"
(.+ version:
'
)([\w._-]*)(
'
.+)
"
,
txt
,
re
.
DOTALL
)
if
m
.
group
(
2
)
==
version
:
print
'
\n\t
Version
"
%s
"
already exists in the appbase.js file !
'
%
version
if
match
.
group
(
2
)
==
version
:
msg
=
'
\n\t
Version
"
%s
"
already exists in the appbase.js file !
'
print
msg
%
version
rep
=
raw_input
(
'
\t
Do you want to continue [n]?
'
)
if
rep
not
in
(
'
y
'
,
'
yes
'
):
sys
.
exit
(
1
)
# update the version and write a new file
s
=
m
.
group
(
1
)
+
version
+
m
.
group
(
3
)
txt
=
m
atch
.
group
(
1
)
+
version
+
m
atch
.
group
(
3
)
fi
=
open
(
JSBASE
,
'
wb
'
)
fi
.
write
(
s
)
fi
.
write
(
txt
)
fi
.
close
()
# look for a pattern HEAD in the CHANGELOG
# split the the string in 2 parts (pre HEAD, post HEAD)
print
'
Set release
'
,
version
,
'
in
'
,
CHANGELOG
s
=
open
(
CHANGELOG
,
'
rb
'
).
read
()
txt
=
open
(
CHANGELOG
,
'
rb
'
).
read
()
m
=
re
.
match
(
"
(.+HEAD
\n
)(.*)
"
,
s
,
re
.
DOTALL
)
m
atch
=
re
.
match
(
"
(.+HEAD
\n
)(.*)
"
,
txt
,
re
.
DOTALL
)
if
m
==
None
:
if
m
atch
==
None
:
print
'
\n\t
No HEAD tag in the CHANGELOG!
\n
'
rep
=
raw_input
(
'
\t
Do you want to continue [n]?
'
)
if
rep
not
in
(
'
y
'
,
'
yes
'
):
sys
.
exit
(
1
)
# update the version and edit the CHANGELOG
s
=
'
%s
\n
%s (%s)
\n
%s
'
%
(
m
.
group
(
1
),
version
,
NOW
.
strftime
(
'
%b %Y
'
),
m
.
group
(
2
))
tpl
=
(
match
.
group
(
1
),
version
,
NOW
.
strftime
(
'
%b %Y
'
),
match
.
group
(
2
))
txt
=
'
%s
\n
%s (%s)
\n
%s
'
%
tpl
fi
=
open
(
CHANGELOG
,
'
wb
'
)
fi
.
write
(
s
)
fi
.
write
(
txt
)
fi
.
close
()
call
([
"
vim
"
,
CHANGELOG
])
...
...
@@ -243,8 +374,12 @@ def set_version(version):
os
.
remove
(
fn
)
def
sphinx
():
"""
Generate the Sphinx documentation.
def
sphinx
(
*
args
,
**
kwargs
):
"""
run the sphinx-build:
git(
"
add CHANGELOG
"
)
git(
"
add
"
, CHAGELOG,
"
foo.txt
"
)
git(
"
commit
"
, stdout=fi)
"""
if
not
os
.
path
.
exists
(
SPHINX
):
...
...
@@ -252,50 +387,68 @@ def sphinx():
print
'
\t
Skip this step.
\n
'
return
if
not
os
.
path
.
exists
(
SPHINXSRC
):
print
'
\n
No sphinx source file !
'
return
cmd
=
[
SPHINX
]
cmd
.
extend
(
args
[
0
].
split
())
# clean the directory
cmd
=
[
"
rm
"
,
"
-rf
"
,
SPHINXDOC
]
call
(
cmd
)
if
len
(
args
)
>
1
:
cmd
.
extend
(
args
[
1
:])
# generate the HTML version
cmd
=
[
SPHINX
,
"
-b
"
,
"
html
"
,
SPHINXSRC
,
SPHINXDOC
]
call
(
cmd
)
call
(
cmd
,
**
kwargs
)
def
start_release
():
"""
Start the release cycle.
"""
print
"
Start the release cycle...
"
old_release
=
get_version
()
print
"
Current release is
"
,
old_release
new_release
=
raw_input
(
MSG_RELEASE
)
if
not
new_release
:
sys
.
exit
(
0
)
print
"
\n
Sphinx HTML documentation in
"
,
SPHINXDOC
,
"
\n
"
branch
=
"
release-%s
"
%
new_release
git
(
"
checkout
"
,
"
-b
"
,
branch
,
"
develop
"
)
set_version
(
new_release
)
change_log
()
build
()
def
tag
():
"""
Tag the current release.
"""
print
"
Tag the release...
"
,
version
=
get_version
()
msg
=
"
Tag %s
"
%
version
# annotated tag
print
'
git tag
'
,
version
cmd
=
[
"
git
"
,
"
tag
"
,
"
-a
"
,
version
,
"
-m
"
,
msg
]
call
(
cmd
)
git
(
"
tag
"
,
"
-a
"
,
version
,
"
-m
"
,
msg
)
def
web2py
():
"""
Produce the binary file for the web2py plugin.
"""
print
'
\n
Build the web2py plugin binary file
'
rep
=
raw_input
(
'
Check that the web2py service is running ? Type CR to continue.
'
)
print
'
Build the web2py plugin binary file...
'
msg
=
'
Check that the web2py service is running [y/N]
'
rep
=
raw_input
(
msg
)
if
rep
:
print
'
\n\t
Skip this step.
\n
'
return
f
=
urllib
.
urlopen
(
PACK_PLUGIN_URL
)
s
=
f
.
read
()
connection
=
urllib
.
urlopen
(
PACK_PLUGIN_URL
)
txt
=
connection
.
read
()
fn
=
DBUI_W2P
%
get_version
().
replace
(
'
.
'
,
''
)
fi
=
open
(
fn
,
'
wb
'
)
fi
.
write
(
s
)
fi
.
write
(
txt
)
fi
.
close
()
# move the file to the build directory
...
...
@@ -311,152 +464,121 @@ def web2py():
if
__name__
==
'
__main__
'
:
# define script options
ops
=
optparse
.
OptionParser
()
OPS
=
optparse
.
OptionParser
()
ops
.
add_option
(
"
-
-start-release-cycle
"
,
OPS
.
add_option
(
"
-
a
"
,
"
--api-doc
"
,
action
=
"
store_true
"
,
dest
=
"
start_release_cycle
"
,
dest
=
"
api_doc
"
,
help
=
"
build the API documentation.
"
)
OPS
.
add_option
(
"
--start-release
"
,
action
=
"
store_true
"
,
dest
=
"
start_release
"
,
help
=
"
start the new release branch cycle.
"
)
ops
.
add_option
(
"
--close-release
-cycle
"
,
OPS
.
add_option
(
"
--close-release
"
,
action
=
"
store_true
"
,
dest
=
"
close_release
_cycle
"
,
dest
=
"
close_release
"
,
help
=
"
close the release branch cycle.
"
)
ops
.
add_option
(
"
-c
"
,
"
--compile
"
,
OPS
.
add_option
(
"
-c
"
,
"
--compile
"
,
action
=
"
store_true
"
,
dest
=
"
compile
"
,
help
=
"
compile the javascript library
using sencha command
.
"
)
help
=
"
compile the javascript library.
"
)
ops
.
add_option
(
"
-
g
"
,
"
--git
"
,
OPS
.
add_option
(
"
-
-commit-changelog
"
,
action
=
"
store_true
"
,
dest
=
"
git
"
,
help
=
"
commit CHANGELOG
,
App.js
, .
.
"
)
dest
=
"
changelog
"
,
help
=
"
commit CHANGELOG
and
App.js.
"
)
ops
.
add_option
(
"
-j
"
,
"
--jsduck
"
,
OPS
.
add_option
(
"
-j
"
,
"
--jsduck
"
,
action
=
"
store_true
"
,
dest
=
"
jsduck
"
,
help
=
"
generate
the JavaScript documentation.
"
)
help
=
"
build
the JavaScript documentation.
"
)
ops
.
add_option
(
"
-r
"
,
"
--
set-release
"
,
OPS
.
add_option
(
"
-r
"
,
"
--
reference-doc
"
,
action
=
"
store_true
"
,
dest
=
"
re
lease
"
,
help
=
"
set
the re
lease in CHANGELOG and App.js
.
"
)
dest
=
"
re
ference_doc
"
,
help
=
"
build
the re
ference manual in HTML
.
"
)
ops
.
add_option
(
"
-
s
"
,
"
--sphinx
"
,
OPS
.
add_option
(
"
-
-reference-pdf
"
,
action
=
"
store_true
"
,
dest
=
"
sphinx
"
,
help
=
"
generate sphinx documentation
.
"
)
dest
=
"
reference_pdf
"
,
help
=
"
build the reference manual in PDF
.
"
)
ops
.
add_option
(
"
-t
"
,
"
--tag
"
,
OPS
.
add_option
(
"
--write-release
"
,
action
=
"
store_true
"
,
dest
=
"
release
"
,
help
=
"
write the release number in CHANGELOG and App.js.
"
)
OPS
.
add_option
(
"
-t
"
,
"
--tag
"
,
action
=
"
store_true
"
,
dest
=
"
tag
"
,
help
=
"
tag the release.
"
)
help
=
"
tag the release
in git
.
"
)
ops
.
add_option
(
"
-v
"
,
"
--
get_release
"
,
OPS
.
add_option
(
"
-v
"
,
"
--
version
"
,
action
=
"
store_true
"
,
dest
=
"
version
"
,
help
=
"
get the current release.
"
)
help
=
"
get the current release
identifier
.
"
)
ops
.
add_option
(
"
-w
"
,
"
--web2py
"
,
OPS
.
add_option
(
"
-w
"
,
"
--web2py
"
,
action
=
"
store_true
"
,
dest
=
"
web2py
"
,
help
=
"
pack the web2py plugin.
"
)
ops
.
set_defaults
(
close_release_cycle
=
False
,
OPS
.
set_defaults
(
api_doc
=
False
,
close_release_cycle
=
False
,
changelog
=
False
,
compile
=
False
,
git
=
False
,
jsduck
=
False
,
reference_doc
=
False
,
reference_pdf
=
False
,
release
=
False
,
sphinx
=
False
,
tag
=
False
,
start_release_cycle
=
False
,
tag
=
False
,
version
=
False
)
(
opt
,
args
)
=
ops
.
parse_args
()
(
OPT
,
ARGS
)
=
OPS
.
parse_args
()
print
'
\n
Start buildVersion
'
# individual action
if
opt
.
compile
:
compile
()
if
opt
.
git
:
git
()
if
opt
.
jsduck
:
jsduck
()
if
opt
.
release
:
version
=
(
args
[
0
]
if
args
else
raw_input
(
MSG_RELEASE
))
set_version
(
version
)
if
opt
.
sphinx
:
sphinx
()
if
opt
.
version
:
version
=
get_version
()
print
"
\n
The current release is %s
\n
"
%
version
# start the release cycle
if
opt
.
start_release_cycle
:
if
OPT
.
api_doc
:
sphinx
(
"
-b html
"
,
os
.
path
.
join
(
DOCSRC
,
API
),
os
.
path
.
join
(
DOCS
,
API
))
print
"
Start the release cycle
"
if
OPT
.
close_release_cycle
:
close_release
()
old_release
=
get_version
()
print
"
Current release is
"
,
old_release
if
OPT
.
compile
:
compile_js
()
new_release
=
raw_input
(
MSG_RELEASE
)
if
not
new_release
:
sys
.
exit
(
0
)
if
OPT
.
changelog
:
change_log
()
branch
=
"
release-%s
"
%
new_release
call
([
"
git
"
,
"
checkout
"
,
"
-b
"
,
branch
,
"
develop
"
])
set_version
(
new_release
)
git
()
compile
()
if
OPT
.
jsduck
:
jsduck
()
sphinx
()
# close the release cycle
if
opt
.
close_release_cycle
:
release
=
raw_input
(
"
Select the release:
"
)
if
not
release
:
sys
.
exit
(
0
)
branch
=
"
release-%s
"
%
release
if
OPT
.
release
:
set_version
(
raw_input
(
MSG_RELEASE
))
msg
=
"
Release %s
"
%
release
print
msg
if
OPT
.
reference_doc
:
sphinx
(
"
-b html
"
,
os
.
path
.
join
(
DOCSRC
,
REFERENCE
),
os
.
path
.
join
(
DOCS
,
REFERENCE
))
call
([
"
git
"
,
"
checkout
"
,
"
develop
"
])
call
([
"
git
"
,
"
merge
"
,
"
--no-ff
"
,
branch
,
"
-m
"
,
msg
]
)
if
OPT
.
reference_pdf
:
build_pdf
(
)
call
([
"
git
"
,
"
checkout
"
,
"
master
"
])
call
([
"
git
"
,
"
merge
"
,
"
--no-ff
"
,
branch
,
"
-m
"
,
msg
]
)
if
OPT
.
version
:
print
"
\n
The current release is %s
\n
"
%
get_version
(
)
call
([
"
git
"
,
"
tag
"
,
"
-a
"
,
release
,
"
-m
"
,
msg
])
if
OPT
.
start_release_cycle
:
start_release
()
rep
=
raw_input
(
"
Destroy branch %s [y/N]:
"
%
branch
)
if
rep
==
"
y
"
:
call
([
"
git
"
,
"
branch
"
,
"
-d
"
,
branch
])
compile
()
jsduck
()
sphinx
()
if
OPT
.
web2py
:
build
()
web2py
()
print
"
The release cycle
"
,
release
,
"
is over
"
if
opt
.
web2py
:
compile
()
jsduck
()
sphinx
()
web2py
()
print
'
Exit buidVersion
\n
'
sys
.
exit
(
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