Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
Nick Gordon | f8b5bcd | 2016-08-11 15:06:50 -0500 | [diff] [blame] | 3 | * Copyright (c) 2014-2016, The University of Memphis, |
| 4 | * Regents of the University of California |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 5 | * |
| 6 | * This file is part of NLSR (Named-data Link State Routing). |
| 7 | * See AUTHORS.md for complete list of NLSR authors and contributors. |
| 8 | * |
| 9 | * NLSR is free software: you can redistribute it and/or modify it under the terms |
| 10 | * of the GNU General Public License as published by the Free Software Foundation, |
| 11 | * either version 3 of the License, or (at your option) any later version. |
| 12 | * |
| 13 | * NLSR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; |
| 14 | * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR |
| 15 | * PURPOSE. See the GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License along with |
| 18 | * NLSR, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>. |
| 19 | **/ |
| 20 | |
| 21 | #ifndef NLSR_VERSION_HPP |
| 22 | #define NLSR_VERSION_HPP |
| 23 | |
| 24 | namespace nlsr { |
| 25 | |
awlane | e8c3f16 | 2024-08-12 12:21:23 -0400 | [diff] [blame^] | 26 | // NLSR version version follows Calendar Versioning (https://calver.org/) |
| 27 | // based on the year and month of the release, followed by an optional "patch" number, |
| 28 | // i.e., `YY.0M[.MICRO (integer without a leading zero)]` using CalVer notation. |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 29 | |
| 30 | // To change version number, modify VERSION variable in top-level wscript. |
| 31 | |
awlane | e8c3f16 | 2024-08-12 12:21:23 -0400 | [diff] [blame^] | 32 | /** \brief NLSR version represented as a string in the CalVer format |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 33 | */ |
| 34 | #define NLSR_VERSION_STRING "@VERSION_STRING@" |
| 35 | |
| 36 | /** \brief NLSR version string, including git commit information, if NLSR is build from |
| 37 | * specific git commit |
| 38 | * |
| 39 | * NLSR_VERSION_BUILD_STRING is obtained using the following command (`NLSR-` prefix is |
| 40 | * afterwards removed): |
| 41 | * |
| 42 | * `git describe --match 'NLSR-*'` |
| 43 | * |
| 44 | * When NLSR is built not from git, NLSR_VERSION_BUILD_STRING equals NLSR_VERSION_STRING |
| 45 | * |
awlane | e8c3f16 | 2024-08-12 12:21:23 -0400 | [diff] [blame^] | 46 | * YY.0M[.MICRO](-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH) |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 47 | * |
awlane | e8c3f16 | 2024-08-12 12:21:23 -0400 | [diff] [blame^] | 48 | * Example: 20.01.1-rc1-1-g5c86570 |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 49 | */ |
| 50 | #define NLSR_VERSION_BUILD_STRING "@VERSION_BUILD@" |
| 51 | |
Vince Lehman | b722b10 | 2014-08-24 16:33:49 -0500 | [diff] [blame] | 52 | } // namespace nlsr |
| 53 | |
| 54 | #endif // NLSR_VERSION_HPP |