[Git][debian-gis-team/debian-gis-team.pages.debian.net][master] Document pre-commit hook for policy updates.

Bas Couwenberg gitlab at salsa.debian.org
Sat Mar 31 12:52:12 UTC 2018


Bas Couwenberg pushed to branch master at Debian GIS Project / debian-gis-team.pages.debian.net


Commits:
d1804034 by Bas Couwenberg at 2018-03-31T14:51:42+02:00
Document pre-commit hook for policy updates.

- - - - -


2 changed files:

- policy.xml
- public/policy/policy.html


Changes:

=====================================
policy.xml
=====================================
--- a/policy.xml
+++ b/policy.xml
@@ -3209,7 +3209,7 @@ clean-patched:
       </para>
       <para>
         After making changes to the <filename class="directory">policy.xml</filename>
-        file it's highly recommended to run <command>make</command> which will validate
+        file you must run <command>make</command> which will validate
         the XML syntax using xmllint before generating the HTML. Make sure you have the
         <literal>xsltproc</literal>, <literal>docbook-xsl</literal> &
         <literal>codespell</literal> packages installed for the 'make' command not to fail.
@@ -3220,6 +3220,38 @@ clean-patched:
         <ulink url="mailto:debian-gis at lists.debian.org">debian-gis at lists.debian.org</ulink>
         mailing list for comments.
       </para>
+      <para>
+        The generated HTML must be committed in the repository along with the
+        <literal>policy.xml</literal> changes, because the HTML is not
+        generated by the GitLab Pipeline.
+      </para>
+      <para>
+        It's highly recommended to configure a <literal>pre-commit</literal>
+        hook, which generates the HTML for every commit:
+<programlisting>
+cat > .git/hooks/pre-commit <<EOF
+#!/bin/sh
+
+set -e
+
+if [ -z "${GIT_DIR}" ]; then
+    echo "GIT_DIR not set" 1>&2
+    exit 1
+fi
+
+exec 1>&2
+
+echo "Running make to generate HTML"
+make
+EOF
+chmod 755 .git/hooks/pre-commit
+</programlisting>
+        If the hook succeeded the commit must be amended to also include the
+        generated HTML:
+<programlisting>
+<command>git commit</command> <option>--amend -a</option>
+</programlisting>
+      </para>
     </sect2>
   </sect1>
 </article>


=====================================
public/policy/policy.html
=====================================
--- a/public/policy/policy.html
+++ b/public/policy/policy.html
@@ -496,7 +496,7 @@ clean-patched:
         indented with 2 spaces.
       </p><p>
         After making changes to the <code class="filename">policy.xml</code>
-        file it's highly recommended to run <span class="command"><strong>make</strong></span> which will validate
+        file you must run <span class="command"><strong>make</strong></span> which will validate
         the XML syntax using xmllint before generating the HTML. Make sure you have the
         <code class="literal">xsltproc</code>, <code class="literal">docbook-xsl</code> &
         <code class="literal">codespell</code> packages installed for the 'make' command not to fail.
@@ -505,4 +505,34 @@ clean-patched:
         git repository. Alternatively, create a patch and send it to the
         <a class="ulink" href="mailto:debian-gis at lists.debian.org" target="_top">debian-gis at lists.debian.org</a>
         mailing list for comments.
+      </p><p>
+        The generated HTML must be committed in the repository along with the
+        <code class="literal">policy.xml</code> changes, because the HTML is not
+        generated by the GitLab Pipeline.
+      </p><p>
+        It's highly recommended to configure a <code class="literal">pre-commit</code>
+        hook, which generates the HTML for every commit:
+</p><pre class="programlisting">
+cat > .git/hooks/pre-commit <<EOF
+#!/bin/sh
+
+set -e
+
+if [ -z "${GIT_DIR}" ]; then
+    echo "GIT_DIR not set" 1>&2
+    exit 1
+fi
+
+exec 1>&2
+
+echo "Running make to generate HTML"
+make
+EOF
+chmod 755 .git/hooks/pre-commit
+</pre><p>
+        If the hook succeeded the commit must be amended to also include the
+        generated HTML:
+</p><pre class="programlisting">
+<span class="command"><strong>git commit</strong></span> <code class="option">--amend -a</code>
+</pre><p>
       </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="tasks.html">Prev</a> </td><td width="20%" align="center"> </td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Blend Tasks </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>
\ No newline at end of file



View it on GitLab: https://salsa.debian.org/debian-gis-team/debian-gis-team.pages.debian.net/commit/d1804034ce4c6ddb64ad4c057cfe71b51d82b1dc

---
View it on GitLab: https://salsa.debian.org/debian-gis-team/debian-gis-team.pages.debian.net/commit/d1804034ce4c6ddb64ad4c057cfe71b51d82b1dc
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-grass-devel/attachments/20180331/51037775/attachment-0001.html>


More information about the Pkg-grass-devel mailing list