blob: 6df2f66dbc4eb3c60564d717180e266e28d35a76 [file] [log] [blame]
Yingdi Yuc9843cf2014-08-04 17:52:19 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/**
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07003 * Copyright (c) 2014-2017, Regents of the University of California
Yingdi Yuc9843cf2014-08-04 17:52:19 -07004 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07005 * This file is part of NDN DeLorean, An Authentication System for Data Archives in
6 * Named Data Networking. See AUTHORS.md for complete list of NDN DeLorean authors
7 * and contributors.
Yingdi Yuc9843cf2014-08-04 17:52:19 -07008 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -07009 * NDN DeLorean is free software: you can redistribute it and/or modify it under
10 * the terms of the GNU General Public License as published by the Free Software
11 * Foundation, either version 3 of the License, or (at your option) any later
12 * version.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070013 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070014 * NDN DeLorean is distributed in the hope that it will be useful, but WITHOUT ANY
15 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
16 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070017 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070018 * You should have received a copy of the GNU General Public License along with NDN
19 * DeLorean, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
Yingdi Yuc9843cf2014-08-04 17:52:19 -070020 */
21
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070022#ifndef NDN_DELOREAN_VERSION_HPP
23#define NDN_DELOREAN_VERSION_HPP
Yingdi Yuc9843cf2014-08-04 17:52:19 -070024
25namespace nsl {
26
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070027/** NDN DeLorean version follows Semantic Versioning 2.0.0 specification
Yingdi Yuc9843cf2014-08-04 17:52:19 -070028 * http://semver.org/
29 */
30
31// To change version number, modify VERSION variable in top-level wscript.
32
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070033/** \brief NDN DeLorean version represented as an integer
Yingdi Yuc9843cf2014-08-04 17:52:19 -070034 *
35 * MAJOR*1000000 + MINOR*1000 + PATCH
36 */
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070037#define NDN_DELOREAN_VERSION @VERSION@
Yingdi Yuc9843cf2014-08-04 17:52:19 -070038
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070039/** \brief NDN DeLorean version represented as a string
Yingdi Yuc9843cf2014-08-04 17:52:19 -070040 *
41 * MAJOR.MINOR.PATCH
42 */
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070043#define NDN_DELOREAN_VERSION_STRING "@VERSION_STRING@"
Yingdi Yuc9843cf2014-08-04 17:52:19 -070044
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070045/** \brief NDN DeLorean version string, including git commit information, if NDN DeLorean
Yingdi Yuc9843cf2014-08-04 17:52:19 -070046 * is build from specific git commit
47 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070048 * NDN_DELOREAN_VERSION_BUILD_STRING is obtained using the following command (`ndn_delorean-`
49 * prefix is afterwards removed):
Yingdi Yuc9843cf2014-08-04 17:52:19 -070050 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070051 * `git describe --match 'ndn_delorean-*'`
Yingdi Yuc9843cf2014-08-04 17:52:19 -070052 *
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070053 * When NDN DeLorean is built not from git, NDN_DELOREAN_VERSION_BUILD_STRING
54 * equals NDN_DELOREAN_VERSION_STRING
Yingdi Yuc9843cf2014-08-04 17:52:19 -070055 *
56 * MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
57 *
58 * Example, 0.1.0-rc1-1-g5c86570
59 */
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070060#define NDN_DELOREAN_VERSION_BUILD_STRING "@VERSION_BUILD@"
Yingdi Yuc9843cf2014-08-04 17:52:19 -070061
62/// MAJOR version
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070063#define NDN_DELOREAN_VERSION_MAJOR @VERSION_MAJOR@
Yingdi Yuc9843cf2014-08-04 17:52:19 -070064/// MINOR version
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070065#define NDN_DELOREAN_VERSION_MINOR @VERSION_MINOR@
Yingdi Yuc9843cf2014-08-04 17:52:19 -070066/// PATCH version
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070067#define NDN_DELOREAN_VERSION_PATCH @VERSION_PATCH@
Yingdi Yuc9843cf2014-08-04 17:52:19 -070068
69} // namespace nsl
70
Alexander Afanasyevbe998ac2017-05-06 13:11:42 -070071#endif // NDN_DELOREAN_VERSION_HPP