From 0ad91e1b77d7e87af87d03753f44a64a7195d5f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Fri, 18 Sep 2015 20:02:37 +0200
Subject: Add section about auto generated id key in .app file

---
 doc/src/guide/app.asciidoc | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

(limited to 'doc/src/guide/app.asciidoc')

diff --git a/doc/src/guide/app.asciidoc b/doc/src/guide/app.asciidoc
index 0c6f137..9b40d21 100644
--- a/doc/src/guide/app.asciidoc
+++ b/doc/src/guide/app.asciidoc
@@ -165,6 +165,28 @@ key from dependencies automatically, which means you need to
 add them to Erlang.mk and to the '.app.src' at the same time,
 duplicating the work.
 
+=== Automatic application resource file values
+
+When building the application resource file, Erlang.mk may
+automatically add an `id` key with information about the
+Git commit (if using Git), or an empty string otherwise.
+It will only do this under specific conditions:
+
+* The application was built as a dependency of another, or
+* The legacy method was used, and the '.app.src' file contained `{id, "git"}`
+
+This value is most useful when you need to help your users,
+as it allows you to know which version they run exactly by
+asking them to look in the file, or by running a simple
+command on their production server:
+
+[source,erlang]
+----
+1> application:get_all_key(cowboy).
+{ok,[{description,"Small, fast, modular HTTP server."},
+     {id,"2.0.0-pre.2-25-g0ffde50-dirty"},
+----
+
 === File formats
 
 Erlang.mk supports a variety of different source file formats.
-- 
cgit v1.2.3

