it understands it has a version now

This commit is contained in:
Nicholas O'Connor 2017-03-22 20:42:08 -07:00
parent 89738cecaa
commit b34430b9e2
5 changed files with 12 additions and 2 deletions

2
.gitignore vendored
View File

@ -14,3 +14,5 @@ Makefile
*/Makefile */Makefile
aclocal.m4 aclocal.m4
autom4te.cache autom4te.cache
src/version.cpp

View File

@ -1,4 +1,4 @@
bin_PROGRAMS = cellar bin_PROGRAMS = cellar
cellar_CPPFLAGS = $(BOOST_CPPFLAGS) cellar_CPPFLAGS = $(BOOST_CPPFLAGS)
cellar_LDFLAGS = $(BOOST_LDFLAGS) $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB) cellar_LDFLAGS = $(BOOST_LDFLAGS) $(BOOST_SYSTEM_LIB) $(BOOST_FILESYSTEM_LIB)
cellar_SOURCES = cellar.cpp fs.cpp bottles.cpp commands.cpp cellar_SOURCES = cellar.cpp fs.cpp bottles.cpp commands.cpp version.cpp

View File

@ -7,6 +7,7 @@
#include "bottles.hpp" #include "bottles.hpp"
#include "commands.hpp" #include "commands.hpp"
#include "version.hpp"
using namespace std; using namespace std;
using namespace cellar; using namespace cellar;
@ -15,6 +16,7 @@ using json = nlohmann::json;
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
vector<string> commands = commands::list_commands(); vector<string> commands = commands::list_commands();
cout << "cellar - bottle management tool for WINE connoisseurs" << std::endl; cout << "cellar - bottle management tool for WINE connoisseurs" << std::endl;
cout << version::short_version() << std::endl;
for (string item : commands) { for (string item : commands) {
cout << item << " has loaded" << endl; cout << item << " has loaded" << endl;
} }

View File

@ -5,7 +5,9 @@
string cellar::version::short_version() { string cellar::version::short_version() {
/*[[[cog /*[[[cog
import cog import cog
print("// I came from the print function!") import os
print(os.getcwd())
cog.outl("return \"dummy cog file!\";") cog.outl("return \"dummy cog file!\";")
]]]*/ ]]]*/

View File

@ -2,6 +2,10 @@
#define __VERSION_HPP #define __VERSION_HPP
#pragma once #pragma once
#include <string>
using namespace std;
namespace cellar { namespace cellar {
namespace version { namespace version {
string short_version(); string short_version();