diff options
Diffstat (limited to 'guide/relx.html')
-rw-r--r-- | guide/relx.html | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guide/relx.html b/guide/relx.html index 1f008a9..da656aa 100644 --- a/guide/relx.html +++ b/guide/relx.html @@ -70,7 +70,7 @@ node. From the release’s root directory:</p><pre class="programlisting">$ mkdi $ mv path/to/example-2.tar.gz releases/2/</pre><p>Finally, upgrade the release:</p><pre class="programlisting">$ bin/example_release upgrade "2/example_release"</pre><p>Or on Windows:</p><pre class="programlisting">$ bin/example_release.cmd upgrade "2/example_release"</pre><p>Your release was upgraded!</p></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="_getting_relx_semver_value"></a>9.6. Getting Relx semver value</h2></div></div></div><p>There is a <span class="strong"><strong>workaround</strong></span> to get the semver value which is generated by Relx based on VCS history.</p><p>Create a file <span class="emphasis"><em>rel/version</em></span> with only one line inside:</p><pre class="programlisting">{{ release_version }}</pre><p>Add/Update the <code class="literal">overlay</code> section of your <code class="literal">relx.config</code>:</p><pre class="programlisting">{overlay, [ {template, "rel/version", "version"} -]}.</pre><p>When you run <code class="literal">mare rel</code> it creates the file <span class="emphasis"><em>$(RELX_OUTPUT_DIR)/example/version</em></span> +]}.</pre><p>When you run <code class="literal">make rel</code> it creates the file <span class="emphasis"><em>$(RELX_OUTPUT_DIR)/example/version</em></span> which contains the version value generated by Relx.</p><pre class="programlisting">$ cat _rel/app/release 1.0.0+build.11.ref5612aa0</pre><p>In your <code class="literal">Makefile</code> you can use this simple snippet to get the version, but please keep in mind that this should depend on the <code class="literal">rel</code> target:</p><pre class="programlisting">$(shell cat $(RELX_OUTPUT_DIR)/$(RELX_REL_NAME)/version)</pre><p>For example:</p><pre class="programlisting">include erlang.mk |