From cc00a8d4f741bea20d737ebe5b16243b48ad0f9d Mon Sep 17 00:00:00 2001 From: Slackadays Date: Sat, 9 Nov 2024 20:30:52 -0500 Subject: [PATCH] Bump to 0.10.0, add branch info --- CMakeLists.txt | 2 +- src/cb/src/clipboard.hpp | 5 +++++ src/cb/src/locales/en_us.cpp | 2 +- src/cb/src/locales/es_co.cpp | 2 +- src/cb/src/locales/es_do.cpp | 2 +- src/cb/src/locales/pt_br.cpp | 2 +- src/cb/src/locales/tr_tr.cpp | 2 +- src/cb/src/utils/utils.cpp | 2 +- 8 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b5b2206f..497d422b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.20) -project(Clipboard LANGUAGES CXX C VERSION 0.9.1) +project(Clipboard LANGUAGES CXX C VERSION 0.10.0) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED True) diff --git a/src/cb/src/clipboard.hpp b/src/cb/src/clipboard.hpp index 276d5ac29..0cb29302b 100644 --- a/src/cb/src/clipboard.hpp +++ b/src/cb/src/clipboard.hpp @@ -63,6 +63,10 @@ namespace fs = std::filesystem; #define GIT_COMMIT_HASH "not available" #endif +#if !defined(GIT_BRANCH) +#define GIT_BRANCH "not available" +#endif + #if !defined(CLIPBOARD_VERSION) #define CLIPBOARD_VERSION "(version not available)" #endif @@ -82,6 +86,7 @@ extern GlobalFilepaths global_path; struct Constants { std::string_view clipboard_version = CLIPBOARD_VERSION; std::string_view clipboard_commit = GIT_COMMIT_HASH; + std::string_view clipboard_branch = GIT_BRANCH; std::string_view data_file_name = "rawdata.clipboard"; std::string_view persistent_directory_name = ".local/state/clipboard"; std::string_view original_files_name = "originals"; diff --git a/src/cb/src/locales/en_us.cpp b/src/cb/src/locales/en_us.cpp index d40c5468b..1e29830c9 100644 --- a/src/cb/src/locales/en_us.cpp +++ b/src/cb/src/locales/en_us.cpp @@ -55,7 +55,7 @@ EnumArray action_descriptions = { "Set a script to run for this clipboard.", "Share a clipboard with others."}; -Message help_message = "[info]┃ This is the Clipboard Project %s (commit %s), the cut, copy, and paste system for the command line.[blank]\n" +Message help_message = "[info]┃ This is the Clipboard Project %s (commit %s, branch %s), the cut, copy, and paste system for the command line.[blank]\n" "[info][bold]┃ Examples[blank]\n" "[progress]┃ cb ct Nuclear_Launch_Codes.txt contactsfolder[blank] [help](This cuts the following items into the " "default clipboard, 0.)[blank]\n" diff --git a/src/cb/src/locales/es_co.cpp b/src/cb/src/locales/es_co.cpp index c15506c99..7901e1462 100644 --- a/src/cb/src/locales/es_co.cpp +++ b/src/cb/src/locales/es_co.cpp @@ -113,7 +113,7 @@ void setLanguageES_CO() { action_descriptions[Ignore] = "Ignora contenido en un portapapeles."; action_descriptions[Search] = "Busca contenido en un portapapeles."; - help_message = "[info]┃ Esto es Clipboard Project %s (commit %s), el sistema para cortar, copiar y pegar adentro del " + help_message = "[info]┃ Esto es Clipboard Project %s (commit %s, branch %s), el sistema para cortar, copiar y pegar adentro del " "terminal.[blank]\n" "[info][bold]┃ Cómo usar[blank]\n" "[progress]┃ cb cortar (cosa) [cosas][blank]\n" diff --git a/src/cb/src/locales/es_do.cpp b/src/cb/src/locales/es_do.cpp index f51e229e9..df3f568fc 100644 --- a/src/cb/src/locales/es_do.cpp +++ b/src/cb/src/locales/es_do.cpp @@ -113,7 +113,7 @@ void setLanguageES_DO() { action_descriptions[Ignore] = "Ignora contenido en un portapapeles."; action_descriptions[Search] = "Busca contenido en un portapapeles."; - help_message = "[info]┃ Esto es Clipboard Project %s (commit %s), el sistema para cortar, copiar y pegar adentro del " + help_message = "[info]┃ Esto es Clipboard Project %s (commit %s, branch %s), el sistema para cortar, copiar y pegar adentro del " "terminal.[blank]\n" "[info][bold]┃ Cómo usar[blank]\n" "[progress]┃ cb cortar (cosa) [cosas][blank]\n" diff --git a/src/cb/src/locales/pt_br.cpp b/src/cb/src/locales/pt_br.cpp index d9d7f2837..cc2219aa6 100644 --- a/src/cb/src/locales/pt_br.cpp +++ b/src/cb/src/locales/pt_br.cpp @@ -94,7 +94,7 @@ void setLanguagePT() { action_descriptions[Ignore] = "Ignora um item ou itens do clipboard."; action_descriptions[Search] = "Busca um item ou itens do clipboard."; - help_message = "[info]┃ Este é Clipboard Project %s (commit %s), o sistema de recortar, copiar e colar para a linha de " + help_message = "[info]┃ Este é Clipboard Project %s (commit %s, branch %s), o sistema de recortar, copiar e colar para a linha de " "comando.[blank]\n" "[info][bold]┃ Como utilizar[blank]\n" "[progress]┃ cb recortar (item) [itens][blank]\n" diff --git a/src/cb/src/locales/tr_tr.cpp b/src/cb/src/locales/tr_tr.cpp index d018c3aed..0c7be7e33 100644 --- a/src/cb/src/locales/tr_tr.cpp +++ b/src/cb/src/locales/tr_tr.cpp @@ -113,7 +113,7 @@ void setLanguageTR() { action_descriptions[Ignore] = "Panodaki öğeyi yoksayar."; action_descriptions[Search] = "Panodaki öğeleri arar."; - help_message = "[info]┃ Clipboard Project %s (commit %s), komut satırı için, kesme, kopyalama ve yapıştırma sistemidir.[blank]\n" + help_message = "[info]┃ Clipboard Project %s (commit %s, branch %s), komut satırı için, kesme, kopyalama ve yapıştırma sistemidir.[blank]\n" "[info][bold]┃ Nasıl kullanılır[blank]\n" "[progress]┃ cb kes (öğe) [öğeler][blank] [help](Bu öğe(leri) keser.)[blank]\n" "[progress]┃ cb kopyala (öğe) [öğeler][blank] [help](Bu öğe(leri) kopyalar.)[blank]\n" diff --git a/src/cb/src/utils/utils.cpp b/src/cb/src/utils/utils.cpp index 3d93c4c56..02eb72cf2 100644 --- a/src/cb/src/utils/utils.cpp +++ b/src/cb/src/utils/utils.cpp @@ -506,7 +506,7 @@ void setFlags() { .append(action_descriptions[static_cast(i)]) .append("[blank]\n"); } - printf(help_message().data(), constants.clipboard_version.data(), constants.clipboard_commit.data(), formatColors(actionsList).data()); + printf(help_message().data(), constants.clipboard_version.data(), constants.clipboard_commit.data(), constants.clipboard_branch.data(), formatColors(actionsList).data()); exit(EXIT_SUCCESS); } }