Package Effector for Arch and give it a desktop entry
packaging/arch/PKGBUILD builds the tagged release from this repository and installs it with pacman; the version test keeps its pkgver in step with CMakeLists.txt. A desktop entry puts the interface in the app menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
add_executable(effector_tests core_tests.cpp ../src/cli/options.cpp)
|
||||
target_link_libraries(effector_tests PRIVATE effector_core)
|
||||
target_compile_options(effector_tests PRIVATE -Wall -Wextra -Wpedantic)
|
||||
# The version test reads the Arch PKGBUILD to keep its pkgver in step.
|
||||
target_compile_definitions(effector_tests PRIVATE EFFECTOR_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
|
||||
|
||||
add_test(NAME core COMMAND effector_tests)
|
||||
|
||||
|
||||
@@ -1725,6 +1725,13 @@ int main() {
|
||||
check(newest != std::string_view::npos &&
|
||||
log.substr(newest + 5).starts_with(std::string(kVersion) + "]"),
|
||||
"the newest changelog entry is this version");
|
||||
std::ifstream pkgbuild(std::string(EFFECTOR_SOURCE_DIR) + "/packaging/arch/PKGBUILD");
|
||||
std::string line;
|
||||
std::string pkgver;
|
||||
while (std::getline(pkgbuild, line)) {
|
||||
if (line.starts_with("pkgver=")) pkgver = line.substr(7);
|
||||
}
|
||||
check(pkgver == kVersion, "the Arch PKGBUILD packages this version");
|
||||
const auto options = parsedOptions({"--version"});
|
||||
check(options && options->showVersion, "--version is understood");
|
||||
const auto shortOptions = parsedOptions({"-V"});
|
||||
|
||||
Reference in New Issue
Block a user