mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
check_integrity.sh: check more strickly.
This commit is contained in:
parent
ac9e35735b
commit
c03e0ad841
|
|
@ -19,6 +19,21 @@ check_bash_script() {
|
|||
|| err "Start git-$1 with '#!/usr/bin/env bash'"
|
||||
}
|
||||
|
||||
check_git_extras_cmd_list() {
|
||||
local whitelist=('extras')
|
||||
for cmd in ${whitelist[*]}; do
|
||||
test "$1" == "$cmd" && return
|
||||
done
|
||||
|
||||
grep "\- \*\*git\-$1(1)\*\*" man/git-extras.md >/dev/null \
|
||||
|| err "Add git-$1 in the list of commands in man/git-extras.md"
|
||||
}
|
||||
|
||||
check_man_page_index() {
|
||||
grep "git\-$1(1) git\-$1" man/index.txt >/dev/null \
|
||||
|| err "Add git-$1 to index.txt"
|
||||
}
|
||||
|
||||
check_documentation() {
|
||||
local cmd="git-$1"
|
||||
test -f "man/$cmd.md" || err "man/$cmd.md is required for bin/$cmd"
|
||||
|
|
@ -27,6 +42,9 @@ check_documentation() {
|
|||
then
|
||||
err "Run 'make docs' to create man/$cmd.1 and man/$cmd.html"
|
||||
fi
|
||||
|
||||
check_git_extras_cmd_list "$@"
|
||||
check_man_page_index "$@"
|
||||
}
|
||||
|
||||
check_Commands_page() {
|
||||
|
|
|
|||
|
|
@ -17,6 +17,15 @@ To generate documentation:
|
|||
$ make -C .. man/git-<command>.{1,html}
|
||||
```
|
||||
|
||||
If you are introducing a new command, you should also update the `man/index.txt`
|
||||
and `man/git-extras.{1,html,md}` via
|
||||
|
||||
```
|
||||
$ make -C .. man/index.txt
|
||||
$ make -C .. man/git-extras.md
|
||||
$ make -C .. man/git-extras.{1,html}
|
||||
```
|
||||
|
||||
4) Remember, we use the following naming convention for files:
|
||||
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-EXTRAS" "1" "May 2018" "" "Git Extras"
|
||||
.TH "GIT\-EXTRAS" "1" "June 2019" "" "Git Extras"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-extras\fR \- Awesome GIT utilities
|
||||
|
|
@ -171,6 +171,9 @@ Self update\.
|
|||
\fBgit\-rename\-branch(1)\fR rename local branch and push to remote
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit\-rename\-remote(1)\fR rename a remote
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBgit\-rename\-tag(1)\fR Rename a tag
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
<li> <strong><a class="man-ref" href="git-refactor.html">git-refactor<span class="s">(1)</span></a></strong> Create refactor branch</li>
|
||||
<li> <strong><a class="man-ref" href="git-release.html">git-release<span class="s">(1)</span></a></strong> Commit, tag and push changes to the repository</li>
|
||||
<li> <strong><a class="man-ref" href="git-rename-branch.html">git-rename-branch<span class="s">(1)</span></a></strong> rename local branch and push to remote</li>
|
||||
<li> <strong><a class="man-ref" href="git-rename-remote.html">git-rename-remote<span class="s">(1)</span></a></strong> rename a remote</li>
|
||||
<li> <strong><a class="man-ref" href="git-rename-tag.html">git-rename-tag<span class="s">(1)</span></a></strong> Rename a tag</li>
|
||||
<li> <strong><a class="man-ref" href="git-repl.html">git-repl<span class="s">(1)</span></a></strong> git read-eval-print-loop</li>
|
||||
<li> <strong><a class="man-ref" href="git-reset-file.html">git-reset-file<span class="s">(1)</span></a></strong> Reset one file</li>
|
||||
|
|
@ -164,7 +165,7 @@
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -177,7 +178,7 @@
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>May 2018</li>
|
||||
<li class='tc'>June 2019</li>
|
||||
<li class='tr'>git-extras(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue