Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
24dd5020
Commit
24dd5020
authored
Nov 15, 2014
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.commit_docs.sh: initial version of the documentation update script
parent
0481c71e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
0 deletions
+76
-0
.commit_docs.sh
.commit_docs.sh
+76
-0
No files found.
.commit_docs.sh
0 → 100755
View file @
24dd5020
#!/bin/bash -e
# from git-sh-setup.sh
require_clean_work_tree
()
{
git rev-parse
--verify
HEAD
>
/dev/null
||
exit
1
git update-index
-q
--ignore-submodules
--refresh
err
=
0
if
!
git diff-files
--quiet
--ignore-submodules
then
echo
>
&2
"Cannot
$0
: You have unstaged changes."
err
=
1
fi
if
!
git diff-index
--cached
--quiet
--ignore-submodules
HEAD
--
then
if
[
$err
=
0
]
then
echo
>
&2
"Cannot
$0
: Your index contains uncommitted changes."
else
echo
>
&2
"Additionally, your index contains uncommitted changes."
fi
err
=
1
fi
if
[
$err
=
1
]
then
test
-n
"
$2
"
&&
echo
>
&2
"
$2
"
exit
1
fi
}
require_clean_work_tree
if
!
which doxygen
>
/dev/null
;
then
echo
"Error: doxygen is required"
exit
1
fi
DOXYGEN_VERSION
=
"
$(
doxygen
--version
)
"
DOC_BRANCH
=
"gh-pages"
ORIG_BRANCH
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
ORIG_COMMIT
=
"
$(
git describe
--match
=
NeVeRmAtCh
--always
--abbrev
=
40
--dirty
)
"
TOP
=
"
$(
pwd
)
"
export
GIT_DIR
=
"
$TOP
/.git"
TMPDIR
=
"
$(
mktemp
--tmpdir
=
$TOP
-d
)
"
HTMLDIR
=
"
$TMPDIR
/_build/html"
INDEX_FILE
=
"
$GIT_DIR
/index.
${
DOC_BRANCH
}
"
rm
-f
"
$INDEX_FILE
"
trap
"{ cd
$TOP
; git checkout --force
${
ORIG_BRANCH
}
; rm -f
$INDEX_FILE
; rm -rf
$TMPDIR
; }"
EXIT
cd
"
$TMPDIR
"
git reset
--hard
HEAD
./autogen.sh
mkdir
_build
cd
_build
../configure
make html
if
!
git checkout
"
${
DOC_BRANCH
}
"
;
then
git checkout
--orphan
"
${
DOC_BRANCH
}
"
fi
touch
"
$HTMLDIR
/.nojekyll"
echo
lib.protobuf-c.io
>
"
$HTMLDIR
/CNAME"
GIT_INDEX_FILE
=
"
$INDEX_FILE
"
GIT_WORK_TREE
=
"
$HTMLDIR
"
\
git add
--no-ignore-removal
.
GIT_INDEX_FILE
=
"
$INDEX_FILE
"
GIT_WORK_TREE
=
"
$HTMLDIR
"
\
git commit
-m
"Rebuild html documentation from commit
${
ORIG_COMMIT
}
using Doxygen
${
DOXYGEN_VERSION
}
"
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