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
2cbbbad48fd3
Commit
2cbbbad48fd3
authored
8 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
create_documentation: Correctly parse branch name
parent
bc167ed85aca
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
create_documentation
+8
-10
8 additions, 10 deletions
create_documentation
with
8 additions
and
10 deletions
create_documentation
+
8
−
10
View file @
2cbbbad4
...
@@ -28,9 +28,17 @@
...
@@ -28,9 +28,17 @@
pushd
$project_home
pushd
$project_home
for
doc_dir
in
doc docs
;
do
for
doc_dir
in
doc docs
;
do
if
[
-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
if
[[
-d
"
$doc_dir
"
]]
;
then
pushd
$doc_dir
pushd
$doc_dir
for
language
in
"en"
;
do
for
language
in
"en"
;
do
make
-e
SPHINXOPTS
=
-Dlanguage
=
${
language
}
$format
make
-e
SPHINXOPTS
=
-Dlanguage
=
${
language
}
$format
# TODO read value from Makefile
# TODO read value from Makefile
builddir
=
_build
builddir
=
_build
...
@@ -31,19 +39,9 @@
...
@@ -31,19 +39,9 @@
if
[[
-d
"
$doc_dir
"
]]
;
then
if
[[
-d
"
$doc_dir
"
]]
;
then
pushd
$doc_dir
pushd
$doc_dir
for
language
in
"en"
;
do
for
language
in
"en"
;
do
make
-e
SPHINXOPTS
=
-Dlanguage
=
${
language
}
$format
make
-e
SPHINXOPTS
=
-Dlanguage
=
${
language
}
$format
# TODO read value from Makefile
# TODO read value from Makefile
builddir
=
_build
builddir
=
_build
if
[
-e
".git"
]
;
then
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
elif
[
-e
".hg"
]
;
then
branch
=
"
$(
hg
id
-b
)
"
fi
if
[[
-z
$branch
]]
;
then
echo
"
${
RED
}
ERROR
${
RESET
}
- empty branch name"
ls
branch
=
"none"
fi
dest_dir
=
$out_dir
/
$project_name
/
$language
/
$branch
dest_dir
=
$out_dir
/
$project_name
/
$language
/
$branch
if
[[
$?
-eq
0
]]
;
then
if
[[
$?
-eq
0
]]
;
then
echo
"
${
YELLOW
}
INFO
${
RESET
}
- Documentation generation done for
$doc_dir
(superproject), copy to
$dest_dir
"
echo
"
${
YELLOW
}
INFO
${
RESET
}
- Documentation generation done for
$doc_dir
(superproject), copy to
$dest_dir
"
...
...
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