diff options
| author | Stefan Boberg <[email protected]> | 2021-09-15 19:49:20 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-15 19:49:20 +0200 |
| commit | 83ccd52321a23c8f1c8a3228cbbf34b8f199a22b (patch) | |
| tree | 9cf1fb68651f616aef2fa28000e4f328ef9204d8 /zen/cmds/deploy.cpp | |
| parent | Added GetSize/GetData functions to reduce cognitive load and bridge the gap b... (diff) | |
| parent | Tweaked logging to streamline access, and simplified setup code for new loggers (diff) | |
| download | archived-zen-83ccd52321a23c8f1c8a3228cbbf34b8f199a22b.tar.xz archived-zen-83ccd52321a23c8f1c8a3228cbbf34b8f199a22b.zip | |
Merge branch 'main' into cbpackage-update
Diffstat (limited to 'zen/cmds/deploy.cpp')
| -rw-r--r-- | zen/cmds/deploy.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/zen/cmds/deploy.cpp b/zen/cmds/deploy.cpp index 3e5b77c20..b8879fefb 100644 --- a/zen/cmds/deploy.cpp +++ b/zen/cmds/deploy.cpp @@ -2,10 +2,9 @@ #include "deploy.h" +#include <zencore/logging.h> #include <zencore/string.h> -#include <spdlog/spdlog.h> - DeployCommand::DeployCommand() { m_Options.add_options()("h,help", "Print help"); @@ -39,10 +38,10 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) // Validate arguments if (m_CopySource.empty()) - throw std::exception("No source specified"); + throw std::runtime_error("No source specified"); if (m_CopyTarget.empty()) - throw std::exception("No target specified"); + throw std::runtime_error("No target specified"); std::filesystem::path ToPath; @@ -53,7 +52,7 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) if (!IsTargetNew && !IsTargetDir) { - throw std::exception("Invalid target specification (needs to be a directory)"); + throw std::runtime_error("Invalid target specification (needs to be a directory)"); } zen::ExtendableStringBuilder<128> Path8; @@ -61,7 +60,7 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) if (IsTargetNew == false && m_IsClean) { - spdlog::info("Clean deploy -- deleting directory {}", Path8.c_str()); + ZEN_INFO("Clean deploy -- deleting directory {}", Path8.c_str()); std::filesystem::remove_all(ToPath); @@ -70,12 +69,12 @@ DeployCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) if (IsTargetNew) { - spdlog::info("Creating directory {}", Path8.c_str()); + ZEN_INFO("Creating directory {}", Path8.c_str()); std::filesystem::create_directories(ToPath); } - spdlog::info("Starting deploy operation..."); + ZEN_INFO("Starting deploy operation..."); // TODO: implement! |