blob: 90b68e143d3ca54af34ade422c975e67139ed2ad [file] [log] [blame]
Alexander Afanasyev4ffcff22014-09-02 15:39:20 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
3 * Copyright (c) 2014, Regents of the University of California.
4 *
5 * This file is part of NDNS (Named Data Networking Domain Name Service).
6 * See AUTHORS.md for complete list of NDNS authors and contributors.
7 *
8 * NDNS is free software: you can redistribute it and/or modify it under the terms
9 * of the GNU General Public License as published by the Free Software Foundation,
10 * either version 3 of the License, or (at your option) any later version.
11 *
12 * NDNS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
13 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 * PURPOSE. See the GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along with
17 * NDNS, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#ifndef NDNS_VERSION_HPP
21#define NDNS_VERSION_HPP
22
23namespace ndn {
24namespace ndns {
25
26/** NDNS version follows Semantic Versioning 2.0.0 specification
27 * http://semver.org/
28 */
29
30// To change version number, modify VERSION variable in top-level wscript.
31
32/** \brief NDNS version represented as an integer
33 *
34 * MAJOR*1000000 + MINOR*1000 + PATCH
35 */
36#define NDNS_VERSION @VERSION@
37
38/** \brief NDNS version represented as a string
39 *
40 * MAJOR.MINOR.PATCH
41 */
42#define NDNS_VERSION_STRING "@VERSION_STRING@"
43
44/** \brief NDNS version string, including git commit information, if NDNS is build from
45 * specific git commit
46 *
47 * NDNS_VERSION_BUILD_STRING is obtained using the following command (`NDNS-` prefix is
48 * afterwards removed):
49 *
50 * `git describe --match 'ndns-*'`
51 *
52 * When NDNS is built not from git, NDNS_VERSION_BUILD_STRING equals NDNS_VERSION_STRING
53 *
54 * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
55 *
56 * Example, 0.1.0-rc1-1-g5c86570
57 */
58#define NDNS_VERSION_BUILD_STRING "@VERSION_BUILD@"
59
60/// MAJOR version
61#define NDNS_VERSION_MAJOR @VERSION_MAJOR@
62/// MINOR version
63#define NDNS_VERSION_MINOR @VERSION_MINOR@
64/// PATCH version
65#define NDNS_VERSION_PATCH @VERSION_PATCH@
66
67} // namespace ndns
68} // namespace ndn
69
70#endif // NDNS_VERSION_HPP