On 07/11/17 17:21, Kinney, Michael D wrote:
> Laszlo,
> 
> I found a GitBook plugin that can provide the branch name and
> the SHA hash in either short or long form.
> 
> https://plugins.gitbook.com/plugin/gitversion
> 
> Here is an example patch to the EDK II Template Specification
> That add this plugin to book.json and add the branch name and
> SHA hash below the build time/date stamp of the document.
> 
> diff --git a/README.md b/README.md
> index 30edb2a..4ad8a96 100644
> --- a/README.md
> +++ b/README.md
> @@ -41,6 +41,10 @@
> 
>  ** {{ gitbook.time|date('MM/DD/YYYY hh:mm:ss') }} **
> 
> +** {{ "GIT branch: " | gitBranch }} **
> +
> +** {{ "GIT hash: " | gitLong }} **
> +
>  {% if book.udkrelease %}
>  ** {{ book.udkrelease }} **
>  {% endif %}
> diff --git a/book.json b/book.json
> index 8c58ffe..d94cbcc 100644
> --- a/book.json
> +++ b/book.json
> @@ -5,6 +5,6 @@
>      "version" : "Revision 0.20"
>    },
> 
> -  "plugins": ["puml"],
> +  "plugins": ["puml", "gitversion"],
>    "pluginsConfig": {}
>  }

Ah, great!

Does the fact that the plugin list is provided in the book itself (in
"book.json") imply that gitbook.com too will load the plugin, and
generate the right output, in these "remote" renderings?

Thank you,
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to