İşlemeleri karşılaştır
Ortak bir işleme yok. "94ade7238e38695b9347f7d12a65d5623ac03ca5" ve "3d0fce590ba48ee680628549fb53b8b3b21b2763" tamamen farklı geçmişlere sahip.
94ade7238e
...
3d0fce590b
2
Makefile
2
Makefile
@ -55,8 +55,6 @@ gtest: $(GTESTS_TESTDIR)/*.cpp $(GTEST_OBJECTS)
|
|||||||
%.o:%.cpp
|
%.o:%.cpp
|
||||||
$(CXX) ${CXXFLAGS} ${LDFLAGS} ${INCLUDEFLAGS} -c -o $@ $<
|
$(CXX) ${CXXFLAGS} ${LDFLAGS} ${INCLUDEFLAGS} -c -o $@ $<
|
||||||
|
|
||||||
version.o:version.cpp
|
|
||||||
$(CXX) ${CXXFLAGS} ${LDFLAGS} ${INCLUDEFLAGS} -DGITCOMMIT=\"$(shell git rev-parse --short HEAD)\" -c -o $@ $<
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(OBJECTS) $(DEPENDS)
|
rm -f $(OBJECTS) $(DEPENDS)
|
||||||
|
|
||||||
|
6
cli.cpp
6
cli.cpp
@ -8,7 +8,6 @@
|
|||||||
#include "authenticator.h"
|
#include "authenticator.h"
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "logger.h"
|
#include "logger.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
CLIHandler::CLIHandler(Config &config, Database &db)
|
CLIHandler::CLIHandler(Config &config, Database &db)
|
||||||
{
|
{
|
||||||
@ -219,8 +218,3 @@ std::pair<std::string, std::vector<std::string>> CLIHandler::splitCommand(std::s
|
|||||||
splitted.erase(splitted.begin());
|
splitted.erase(splitted.begin());
|
||||||
return {cmd, splitted};
|
return {cmd, splitted};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::pair<bool, std::string> CLIHandler::version(const std::vector<std::string> &args)
|
|
||||||
{
|
|
||||||
return {true, get_version_string()};
|
|
||||||
}
|
|
||||||
|
4
cli.h
4
cli.h
@ -30,7 +30,6 @@ class CLIHandler
|
|||||||
std::pair<bool, std::string> user_set_perms(const std::vector<std::string> &args);
|
std::pair<bool, std::string> user_set_perms(const std::vector<std::string> &args);
|
||||||
std::pair<bool, std::string> user_list(const std::vector<std::string> &args);
|
std::pair<bool, std::string> user_list(const std::vector<std::string> &args);
|
||||||
std::pair<bool, std::string> user_show(const std::vector<std::string> &args);
|
std::pair<bool, std::string> user_show(const std::vector<std::string> &args);
|
||||||
std::pair<bool, std::string> version(const std::vector<std::string> &args);
|
|
||||||
|
|
||||||
std::vector<struct cmd> cmds{
|
std::vector<struct cmd> cmds{
|
||||||
{{"user",
|
{{"user",
|
||||||
@ -53,8 +52,7 @@ class CLIHandler
|
|||||||
return {true, ""};
|
return {true, ""};
|
||||||
}},
|
}},
|
||||||
{"help", "print this help", 0, {}, &CLIHandler::cli_help},
|
{"help", "print this help", 0, {}, &CLIHandler::cli_help},
|
||||||
{"attach", "attach to running instance", 0, {}, &CLIHandler::attach},
|
{"attach", "attach to running instance", 0, {}, &CLIHandler::attach}}};
|
||||||
{"version", "print verison info", 0, {}, &CLIHandler::version}}};
|
|
||||||
|
|
||||||
std::pair<bool, std::string> processCommand(const std::vector<CLIHandler::cmd> &commands, std::string cmd,
|
std::pair<bool, std::string> processCommand(const std::vector<CLIHandler::cmd> &commands, std::string cmd,
|
||||||
const std::vector<std::string> &args);
|
const std::vector<std::string> &args);
|
||||||
|
@ -41,7 +41,6 @@ SOFTWARE.
|
|||||||
#include "cli.h"
|
#include "cli.h"
|
||||||
#include "cliconsole.h"
|
#include "cliconsole.h"
|
||||||
#include "cliserver.h"
|
#include "cliserver.h"
|
||||||
#include "version.h"
|
|
||||||
|
|
||||||
void sigterm_handler(int arg)
|
void sigterm_handler(int arg)
|
||||||
{
|
{
|
||||||
@ -74,6 +73,11 @@ std::unique_ptr<ICache> createCache(const ConfigVariableResolver &resolver)
|
|||||||
return std::make_unique<FsCache>(path);
|
return std::make_unique<FsCache>(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string get_version_string()
|
||||||
|
{
|
||||||
|
return "master";
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
11
version.cpp
11
version.cpp
@ -1,11 +0,0 @@
|
|||||||
#include "version.h"
|
|
||||||
|
|
||||||
std::string git_commit_id()
|
|
||||||
{
|
|
||||||
return std::string(GITCOMMIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string get_version_string()
|
|
||||||
{
|
|
||||||
return git_commit_id() + " Built: " + __DATE__ + " " + __TIME__;
|
|
||||||
}
|
|
@ -1,7 +0,0 @@
|
|||||||
#ifndef VERSION_H
|
|
||||||
#define VERSION_H
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
std::string git_commit_id();
|
|
||||||
std::string get_version_string();
|
|
||||||
#endif // VERSION_H
|
|
Yükleniyor…
x
Yeni konuda referans
Bir kullanıcı engelle