Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 3 | * Copyright (c) 2014-2017, Regents of the University of California |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 4 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 5 | * 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 Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 8 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 9 | * 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 Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 13 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 14 | * 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 Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 17 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 18 | * 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 Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 20 | */ |
| 21 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 22 | #ifndef NDN_DELOREAN_VERSION_HPP |
| 23 | #define NDN_DELOREAN_VERSION_HPP |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 24 | |
| 25 | namespace nsl { |
| 26 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 27 | /** NDN DeLorean version follows Semantic Versioning 2.0.0 specification |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 28 | * http://semver.org/ |
| 29 | */ |
| 30 | |
| 31 | // To change version number, modify VERSION variable in top-level wscript. |
| 32 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 33 | /** \brief NDN DeLorean version represented as an integer |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 34 | * |
| 35 | * MAJOR*1000000 + MINOR*1000 + PATCH |
| 36 | */ |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 37 | #define NDN_DELOREAN_VERSION @VERSION@ |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 38 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 39 | /** \brief NDN DeLorean version represented as a string |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 40 | * |
| 41 | * MAJOR.MINOR.PATCH |
| 42 | */ |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 43 | #define NDN_DELOREAN_VERSION_STRING "@VERSION_STRING@" |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 44 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 45 | /** \brief NDN DeLorean version string, including git commit information, if NDN DeLorean |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 46 | * is build from specific git commit |
| 47 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 48 | * NDN_DELOREAN_VERSION_BUILD_STRING is obtained using the following command (`ndn_delorean-` |
| 49 | * prefix is afterwards removed): |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 50 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 51 | * `git describe --match 'ndn_delorean-*'` |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 52 | * |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 53 | * When NDN DeLorean is built not from git, NDN_DELOREAN_VERSION_BUILD_STRING |
| 54 | * equals NDN_DELOREAN_VERSION_STRING |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 55 | * |
| 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 Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 60 | #define NDN_DELOREAN_VERSION_BUILD_STRING "@VERSION_BUILD@" |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 61 | |
| 62 | /// MAJOR version |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 63 | #define NDN_DELOREAN_VERSION_MAJOR @VERSION_MAJOR@ |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 64 | /// MINOR version |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 65 | #define NDN_DELOREAN_VERSION_MINOR @VERSION_MINOR@ |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 66 | /// PATCH version |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 67 | #define NDN_DELOREAN_VERSION_PATCH @VERSION_PATCH@ |
Yingdi Yu | c9843cf | 2014-08-04 17:52:19 -0700 | [diff] [blame] | 68 | |
| 69 | } // namespace nsl |
| 70 | |
Alexander Afanasyev | be998ac | 2017-05-06 13:11:42 -0700 | [diff] [blame^] | 71 | #endif // NDN_DELOREAN_VERSION_HPP |