From 3f0a0c1582f55e0da950a7a321d25ffcf240ec6f Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 27 Jan 2021 20:01:43 +0200 Subject: Can read project version from a file. --- docs/markdown/snippets/versionfile.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docs/markdown/snippets/versionfile.md (limited to 'docs/markdown/snippets') diff --git a/docs/markdown/snippets/versionfile.md b/docs/markdown/snippets/versionfile.md new file mode 100644 index 0000000..6071f2c --- /dev/null +++ b/docs/markdown/snippets/versionfile.md @@ -0,0 +1,12 @@ +## Project version can be specified with a file + +Meson can be instructed to load project's version string from an +external file like this: + +```meson +project('foo', 'c' version: files('VERSION')) +``` + +The version file must contain exactly one line of text and that will +be set as the project's version. If the line ends in a newline +character, it is removed. -- cgit v1.1