diff --git a/check_integrity.sh b/check_integrity.sh index 917b66a..4d61a30 100755 --- a/check_integrity.sh +++ b/check_integrity.sh @@ -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() { diff --git a/man/Readme.md b/man/Readme.md index 4eb497b..21f3d7d 100644 --- a/man/Readme.md +++ b/man/Readme.md @@ -17,6 +17,15 @@ To generate documentation: $ make -C .. man/git-.{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: ``` diff --git a/man/git-extras.1 b/man/git-extras.1 index 0aa2426..af071d6 100644 --- a/man/git-extras.1 +++ b/man/git-extras.1 @@ -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 diff --git a/man/git-extras.html b/man/git-extras.html index 8be89cf..8266e97 100644 --- a/man/git-extras.html +++ b/man/git-extras.html @@ -141,6 +141,7 @@
  • git-refactor(1) Create refactor branch
  • git-release(1) Commit, tag and push changes to the repository
  • git-rename-branch(1) rename local branch and push to remote
  • +
  • git-rename-remote(1) rename a remote
  • git-rename-tag(1) Rename a tag
  • git-repl(1) git read-eval-print-loop
  • git-reset-file(1) Reset one file
  • @@ -164,7 +165,7 @@

    AUTHOR

    -

    Written by Tj Holowaychuk <tj@vision-media.ca>

    +

    Written by Tj Holowaychuk <tj@vision-media.ca>

    REPORTING BUGS

    @@ -177,7 +178,7 @@
    1. -
    2. May 2018
    3. +
    4. June 2019
    5. git-extras(1)