Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
f550ff30da97
Commit
f550ff30da97
authored
5 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
avoid guessing branch name for each potential documentation directory
parent
2006f56d5f23
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conf2reST.py
+2
-2
2 additions, 2 deletions
conf2reST.py
create_documentation
+12
-10
12 additions, 10 deletions
create_documentation
with
14 additions
and
12 deletions
conf2reST.py
+
2
−
2
View file @
f550ff30
...
...
@@ -13,5 +13,5 @@
_logger
=
logging
.
getLogger
(
__name__
)
__version__
=
'
0.2.
0
'
__version__
=
'
0.2.
1
'
__date__
=
'
2016-07-15
'
...
...
@@ -17,5 +17,5 @@
__date__
=
'
2016-07-15
'
__updated__
=
'
2019-06-
05
'
__updated__
=
'
2019-06-
19
'
def
main
(
argv
=
None
):
# IGNORE:C0111
...
...
This diff is collapsed.
Click to expand it.
create_documentation
+
12
−
10
View file @
f550ff30
...
...
@@ -28,4 +28,16 @@
pushd
$project_home
# determine branch name
if
[
-n
"
$DRONE_BRANCH
"
]
;
then
branch
=
"
$DRONE_BRANCH
"
elif
[
-e
".git"
]
;
then
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
elif
[
-e
".hg"
]
;
then
branch
=
"
$(
hg
id
-b
)
"
else
echo
"
${
RED
}
WARN
${
RESET
}
- Branch name not found"
branch
=
"unknown"
fi
for
doc_dir
in
doc docs
;
do
...
...
@@ -31,14 +43,4 @@
for
doc_dir
in
doc docs
;
do
if
[
-n
"
$DRONE_BRANCH
"
]
;
then
branch
=
"
$DRONE_BRANCH
"
elif
[
-e
".git"
]
;
then
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
elif
[
-e
".hg"
]
;
then
branch
=
"
$(
hg
id
-b
)
"
else
echo
"
${
RED
}
WARN
${
RESET
}
- Branch name not found"
branch
=
"unknown"
fi
if
[[
-d
"
$doc_dir
"
]]
;
then
pushd
$doc_dir
for
language
in
"en"
;
do
...
...
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