Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
d68bce46
Commit
d68bce46
authored
Apr 23, 2015
by
carlosperate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor fixes to the doc build script.
parent
0163b931
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
package/build_docs.py
package/build_docs.py
+8
-13
No files found.
package/build_docs.py
View file @
d68bce46
...
...
@@ -43,8 +43,7 @@ except ImportError:
# Path data
GITHUB_USER
=
"carlosperate"
WIKI_NAME
=
"ardublockly.wiki"
GITHUB_WIKI_REPO_SHORT
=
"github.com/%s/%s.git"
%
(
GITHUB_USER
,
WIKI_NAME
)
GITHUB_WIKI_REPO
=
"https://www."
+
GITHUB_WIKI_REPO_SHORT
GITHUB_WIKI_REPO
=
"github.com/%s/%s.git"
%
(
GITHUB_USER
,
WIKI_NAME
)
MKDOCS_FOLDER
=
"ardublocklydocs"
THIS_FILE_DIR
=
os
.
path
.
dirname
(
os
.
path
.
realpath
(
__file__
))
...
...
@@ -58,15 +57,6 @@ def pull_wiki_repo():
Pulls latest changes from the wiki repo.
:return: Boolean indicating if the operation was successful.
"""
# Ensure the submodule is initialised
pipe
=
subprocess
.
PIPE
git_process
=
subprocess
.
Popen
(
[
"git"
,
"submodule"
,
"update"
],
stdout
=
pipe
,
stderr
=
pipe
)
std_op
,
std_err_op
=
git_process
.
communicate
()
if
std_err_op
:
print
(
"ERROR: Could not update git submodule !
\n
%s"
+
std_err_op
)
return
False
# Set working directory to the wiki repository
wiki_folder
=
os
.
path
.
join
(
MKDOCS_DIR
,
WIKI_NAME
)
if
os
.
path
.
isdir
(
wiki_folder
):
...
...
@@ -75,7 +65,12 @@ def pull_wiki_repo():
print
(
"ERROR: Wiki repo directory is not correct: %s"
%
wiki_folder
)
return
False
# Ensure the submodule is initialised, progress is printed to stderr so just
# call subprocess with all data sent to console and error check later
subprocess
.
call
([
"git"
,
"submodule"
,
"update"
,
"--init"
,
"--recursive"
])
# Ensure the subfolder selected is the correct repository
pipe
=
subprocess
.
PIPE
git_process
=
subprocess
.
Popen
(
[
"git"
,
"config"
,
"--get"
,
"remote.origin.url"
],
stdout
=
pipe
,
stderr
=
pipe
)
...
...
@@ -86,8 +81,8 @@ def pull_wiki_repo():
"repository !
\n
%s"
+
std_err_op
)
return
False
if
not
GITHUB_WIKI_REPO
_SHORT
in
std_op
:
print
((
"ERROR: Wiki repository:
\n\t
%s
\n
"
%
GITHUB_WIKI_REPO
_SHORT
)
+
if
not
GITHUB_WIKI_REPO
in
std_op
:
print
((
"ERROR: Wiki repository:
\n\t
%s
\n
"
%
GITHUB_WIKI_REPO
)
+
"not found in directory %s url:
\n\t
%s
\n
"
%
(
wiki_folder
,
std_op
))
return
False
...
...
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