mirror of
https://github.com/ModOrganizer2/mob.git
synced 2026-07-27 14:07:05 -07:00
git will check for uncommitted changes before deleting added --ignore-uncommitted-changes
51 lines
721 B
C++
51 lines
721 B
C++
#include "pch.h"
|
|
#include "tasks.h"
|
|
|
|
namespace mob
|
|
{
|
|
|
|
spdlog::spdlog()
|
|
: basic_task("spdlog")
|
|
{
|
|
}
|
|
|
|
std::string spdlog::version()
|
|
{
|
|
return conf::version_by_name("spdlog");
|
|
}
|
|
|
|
bool spdlog::prebuilt()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
fs::path spdlog::source_path()
|
|
{
|
|
return paths::build() / ("spdlog-" + version());
|
|
}
|
|
|
|
void spdlog::do_clean(clean c)
|
|
{
|
|
instrument<times::clean>([&]
|
|
{
|
|
if (is_any_set(c, clean::redownload|clean::reextract))
|
|
{
|
|
git::delete_directory(cx(), source_path());
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
|
|
void spdlog::do_fetch()
|
|
{
|
|
instrument<times::fetch>([&]
|
|
{
|
|
run_tool(task_conf().make_git()
|
|
.url(task_conf().make_git_url("gabime", "spdlog"))
|
|
.branch(version())
|
|
.root(source_path()));
|
|
});
|
|
}
|
|
|
|
} // namespace
|