core: unify version string
refs #2671 Change-Id: I88a58a500a43635cc8698c4bf444723d6e713590
This commit is contained in:
1 parent
1d8a581223
commit
1753afb2df
8 files changed
+79
-125
No files matched your search
+1
-1
@@ -57,6 +57,6 @@ using std::size_t;
|
||||
using boost::noncopyable;
|
||||
|
||||
|
||||
} // namespace
|
||||
} // namespace ndn
|
||||
|
||||
#endif // NDN_TOOLS_CORE_COMMON_HPP
|
||||
@@ -0,0 +1,28 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2015, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
*
|
||||
* ndn-tools is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation,
|
||||
* either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "version.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace tools {
|
||||
|
||||
const char VERSION[] = "0.1.0-dev";
|
||||
|
||||
} // namespace tools
|
||||
} // namespace ndn
|
||||
@@ -0,0 +1,35 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2015, Arizona Board of Regents.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
*
|
||||
* ndn-tools is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation,
|
||||
* either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NDN_TOOLS_CORE_VERSION_HPP
|
||||
#define NDN_TOOLS_CORE_VERSION_HPP
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace tools {
|
||||
|
||||
/** \brief version of ndn-tools
|
||||
*/
|
||||
extern const char VERSION[];
|
||||
|
||||
} // namespace tools
|
||||
} // namespace ndn
|
||||
|
||||
#endif // NDN_TOOLS_CORE_VERSION_HPP
|
||||
@@ -48,11 +48,7 @@
|
||||
* @author Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
|
||||
*/
|
||||
|
||||
#include "version.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include "core/version.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace peek {
|
||||
@@ -282,7 +278,7 @@ main(int argc, char* argv[])
|
||||
program.setTimeout(atoi(optarg));
|
||||
break;
|
||||
case 'V':
|
||||
std::cout << NFD_VERSION_BUILD_STRING << std::endl;
|
||||
std::cout << "ndnpeek " << tools::VERSION << std::endl;
|
||||
return 0;
|
||||
default:
|
||||
program.usage();
|
||||
|
||||
@@ -48,12 +48,7 @@
|
||||
* @author Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
|
||||
*/
|
||||
|
||||
#include "version.hpp"
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
#include "core/version.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace peek {
|
||||
@@ -274,7 +269,7 @@ main(int argc, char* argv[])
|
||||
program.setTimeout(atoi(optarg));
|
||||
break;
|
||||
case 'V':
|
||||
std::cout << NFD_VERSION_BUILD_STRING << std::endl;
|
||||
std::cout << "ndnpoke " << tools::VERSION << std::endl;
|
||||
return 0;
|
||||
default:
|
||||
program.usage();
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
||||
/**
|
||||
* Copyright (c) 2014-2015, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
* Washington University in St. Louis,
|
||||
* Beijing Institute of Technology,
|
||||
* The University of Memphis.
|
||||
*
|
||||
* This file is part of ndn-tools (Named Data Networking Essential Tools).
|
||||
* See AUTHORS.md for complete list of ndn-tools authors and contributors.
|
||||
*
|
||||
* ndn-tools is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation,
|
||||
* either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* ndn-tools is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* ndn-tools, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/**
|
||||
* Copyright (c) 2014, Regents of the University of California,
|
||||
* Arizona Board of Regents,
|
||||
* Colorado State University,
|
||||
* University Pierre & Marie Curie, Sorbonne University,
|
||||
* Washington University in St. Louis,
|
||||
* Beijing Institute of Technology,
|
||||
* The University of Memphis
|
||||
*
|
||||
* This file is part of NFD (Named Data Networking Forwarding Daemon).
|
||||
* See AUTHORS.md for complete list of NFD authors and contributors.
|
||||
*
|
||||
* NFD is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Foundation,
|
||||
* either version 3 of the License, or (at your option) any later version.
|
||||
*
|
||||
* NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* NFD, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef NFD_VERSION_HPP
|
||||
#define NFD_VERSION_HPP
|
||||
|
||||
namespace nfd {
|
||||
|
||||
/** NFD version follows Semantic Versioning 2.0.0 specification
|
||||
* http://semver.org/
|
||||
*/
|
||||
|
||||
// To change version number, modify VERSION variable in top-level wscript.
|
||||
|
||||
/** \brief NFD version represented as an integer
|
||||
*
|
||||
* MAJOR*1000000 + MINOR*1000 + PATCH
|
||||
*/
|
||||
#define NFD_VERSION 3001
|
||||
|
||||
/** \brief NFD version represented as a string
|
||||
*
|
||||
* MAJOR.MINOR.PATCH
|
||||
*/
|
||||
#define NFD_VERSION_STRING "0.3.1"
|
||||
|
||||
/** \brief NFD version string, including git commit information, if NFD is build from
|
||||
* specific git commit
|
||||
*
|
||||
* NFD_VERSION_BUILD_STRING is obtained using the following command (`NFD-` prefix is
|
||||
* afterwards removed):
|
||||
*
|
||||
* `git describe --match 'NFD-*'`
|
||||
*
|
||||
* When NFD is built not from git, NFD_VERSION_BUILD_STRING equals NFD_VERSION_STRING
|
||||
*
|
||||
* MAJOR.MINOR.PATCH(-release-candidate-tag)(-(number-of-commits-since-tag)-COMMIT-HASH)
|
||||
*
|
||||
* Example, 0.1.0-rc1-1-g5c86570
|
||||
*/
|
||||
#define NFD_VERSION_BUILD_STRING "0.3.1-7-g2231ab5"
|
||||
|
||||
/// MAJOR version
|
||||
#define NFD_VERSION_MAJOR 0
|
||||
/// MINOR version
|
||||
#define NFD_VERSION_MINOR 3
|
||||
/// PATCH version
|
||||
#define NFD_VERSION_PATCH 1
|
||||
|
||||
} // namespace nfd
|
||||
|
||||
#endif // NFD_VERSION_HPP
|
||||
@@ -35,12 +35,7 @@
|
||||
* @author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
|
||||
*/
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include <ndn-cxx/name.hpp>
|
||||
#include <ndn-cxx/security/key-chain.hpp>
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include "core/version.hpp"
|
||||
|
||||
namespace ndn {
|
||||
namespace ping {
|
||||
@@ -209,7 +204,7 @@ main(int argc, char* argv[])
|
||||
int res;
|
||||
|
||||
NdnPingServer program(argv[0]);
|
||||
while ((res = getopt(argc, argv, "hdtp:x:")) != -1)
|
||||
while ((res = getopt(argc, argv, "hdtp:x:V")) != -1)
|
||||
{
|
||||
switch (res) {
|
||||
case 'h':
|
||||
@@ -224,7 +219,10 @@ main(int argc, char* argv[])
|
||||
case 't':
|
||||
program.setPrintTimestamp();
|
||||
break;
|
||||
default:
|
||||
case 'V':
|
||||
std::cout << "ndnpingserver " << tools::VERSION << std::endl;
|
||||
return 0;
|
||||
default:
|
||||
program.usage();
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -35,13 +35,9 @@
|
||||
* @author: Jerald Paul Abraham <jeraldabraham@email.arizona.edu>
|
||||
*/
|
||||
|
||||
#include <ndn-cxx/face.hpp>
|
||||
#include <ndn-cxx/name.hpp>
|
||||
#include "core/version.hpp"
|
||||
|
||||
#include <boost/asio.hpp>
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/date_time/posix_time/posix_time.hpp>
|
||||
#include <boost/noncopyable.hpp>
|
||||
|
||||
namespace ndn {
|
||||
namespace ping {
|
||||
@@ -389,7 +385,7 @@ main(int argc, char* argv[])
|
||||
int res;
|
||||
|
||||
NdnPing program(argv[0]);
|
||||
while ((res = getopt(argc, argv, "htai:c:n:p:")) != -1)
|
||||
while ((res = getopt(argc, argv, "htai:c:n:p:V")) != -1)
|
||||
{
|
||||
switch (res) {
|
||||
case 'a':
|
||||
@@ -418,6 +414,9 @@ main(int argc, char* argv[])
|
||||
case 't':
|
||||
program.setPrintTimestamp();
|
||||
break;
|
||||
case 'V':
|
||||
std::cout << "ndnping " << tools::VERSION << std::endl;
|
||||
return 0;
|
||||
default:
|
||||
program.usage();
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user