Add another example about GitHub projects with no versions.

Sponsored by:	Absolight
This commit is contained in:
Mathieu Arnold 2017-08-14 14:59:20 +00:00
parent 9a953bdba8
commit 2316b460bd
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50673

View file

@ -2516,6 +2516,39 @@ USE_GITHUB= yes</programlisting>
<varname>${WRKDIR}/foo-1.0.2</varname>.</para>
</example>
<example xml:id="makefile-master_sites-github-ex4">
<title>Using <varname>USE_GITHUB</varname> When Upstream Does
Not Use Versions</title>
<para>If there never was a version upstream, do not invent one
like <literal>0.1</literal> or <literal>1.0</literal>.
Create the port with a <varname>DISTVERSION</varname> of
<literal>g<replaceable>YYYY</replaceable><replaceable>MM</replaceable><replaceable>DD</replaceable></literal>,
where <literal>g</literal> is for
<application>Git</application>, and
<literal><replaceable>YYYY</replaceable><replaceable>MM</replaceable><replaceable>DD</replaceable></literal>
represents the date the commit referenced in
<varname>GH_TAGNAME</varname>.</para>
<programlisting>PORTNAME= bar
DISTVERSION= g20140411
USE_GITHUB= yes
GH_TAGNAME= c472d66b</programlisting>
<para>This creates a versioning scheme that increases over
time, and that is still before version <literal>0</literal>
(see <xref linkend="makefile-versions-ex-pkg-version"/> for
details on &man.pkg-version.8;):</para>
<screen>&prompt.user; <userinput>pkg version -t g20140411 0</userinput>
&lt;</screen>
<para>Which means using <varname>PORTEPOCH</varname> will not
be needed in case upstream decides to cut versions in the
future.</para>
</example>
<sect3 xml:id="makefile-master_sites-github-multiple">
<title>Fetching Multiple Files from GitHub</title>