From 8c2638e76deee507dae84ac502f2ed8af89a9535 Mon Sep 17 00:00:00 2001 From: synacker Date: Sat, 13 Jan 2024 19:48:14 +0300 Subject: [PATCH] Fixed compilation and version parameters --- .github/workflows/daggy-github-actions.yaml | 4 ++-- CI/conan/profiles/macos-clang14_x64 | 8 ++++++++ git_version.py | 1 + src/Daggy/CConsoleDaggy.cpp | 2 ++ src/DaggyCore/tests/local/CMakeLists.txt | 1 - src/cmake/version.cmake | 2 +- 6 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 CI/conan/profiles/macos-clang14_x64 diff --git a/.github/workflows/daggy-github-actions.yaml b/.github/workflows/daggy-github-actions.yaml index 701d6f67..9fe4f048 100644 --- a/.github/workflows/daggy-github-actions.yaml +++ b/.github/workflows/daggy-github-actions.yaml @@ -194,13 +194,13 @@ jobs: run: conan config install CI/conan - name: Conan install - run: conan install . --build=missing --profile:build=macos-clang13_x64 --profile:host=macos-clang13_x64 -of . + run: conan install . --build=missing --profile:build=macos-clang13_x64 --profile:host=macos-clang14_x64 -of . - name: Conan remove build folders run: conan cache clean "*" --source --build --temp --download - name: Conan build - run: conan build . --profile:build=macos-clang13_x64 --profile:host=macos-clang13_x64 --build=missing -of . + run: conan build . --profile:build=macos-clang13_x64 --profile:host=macos-clang14_x64 --build=missing -of . - name: daggy version working-directory: build/Release diff --git a/CI/conan/profiles/macos-clang14_x64 b/CI/conan/profiles/macos-clang14_x64 new file mode 100644 index 00000000..349e8d4e --- /dev/null +++ b/CI/conan/profiles/macos-clang14_x64 @@ -0,0 +1,8 @@ +[settings] +os=Macos +arch=x86_64 +compiler=apple-clang +compiler.version=14 +compiler.cppstd=17 +compiler.libcxx=libc++ +build_type=Release \ No newline at end of file diff --git a/git_version.py b/git_version.py index ed5b1d7e..a5d4ba54 100644 --- a/git_version.py +++ b/git_version.py @@ -56,6 +56,7 @@ def build(self): @property def branch(self): stream = os.popen("git branch --show-current") + return stream.read().strip() @property diff --git a/src/Daggy/CConsoleDaggy.cpp b/src/Daggy/CConsoleDaggy.cpp index 5237acf9..ace80d69 100644 --- a/src/Daggy/CConsoleDaggy.cpp +++ b/src/Daggy/CConsoleDaggy.cpp @@ -42,6 +42,8 @@ CConsoleDaggy::CConsoleDaggy(QObject* parent) qApp->setApplicationName("daggy"); qApp->setApplicationVersion(DAGGY_VERSION_STANDARD); qApp->setOrganizationName(DAGGY_VENDOR); + qApp->setApplicationVersion(DAGGY_VERSION_FULL); + qApp->setOrganizationDomain("daggy.dev"); connect(this, &CConsoleDaggy::interrupt, this, &CConsoleDaggy::stop, Qt::QueuedConnection); connect(qApp, &QCoreApplication::aboutToQuit, this, &CConsoleDaggy::fixPcaps); diff --git a/src/DaggyCore/tests/local/CMakeLists.txt b/src/DaggyCore/tests/local/CMakeLists.txt index d51d7a3b..3863e34b 100644 --- a/src/DaggyCore/tests/local/CMakeLists.txt +++ b/src/DaggyCore/tests/local/CMakeLists.txt @@ -17,7 +17,6 @@ set(SOURCES qt6_add_executable(${TARGET} ${SOURCES}) include(rpath_bin) add_test(NAME ${TARGET} COMMAND ${TARGET} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}) -message("!!!!!!!!!!!!!!!!!111111111111111 PATH $ENV{PATH}:${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") set_tests_properties(${TARGET} PROPERTIES ENVIRONMENT "PATH=$ENV{PATH}:${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}") target_link_libraries(${TARGET} PRIVATE DaggyCore Qt6::Test) diff --git a/src/cmake/version.cmake b/src/cmake/version.cmake index b48e65c1..9f9cd0c1 100644 --- a/src/cmake/version.cmake +++ b/src/cmake/version.cmake @@ -63,7 +63,7 @@ macro(SET_GIT_VERSION) string(REGEX REPLACE "^v" "" VERSION ${VERSION_TAG}) set(VERSION ${VERSION}.${VERSION_BUILD}) set(VERSION_FULL ${VERSION}-${VERSION_BRANCH}) - if (VERSION_BRANCH STREQUAL ${VERSION_BRANCH} OR VERSION_BRANCH MATCHES "release/.*") + if (VERSION_BRANCH STREQUAL ${GIT_DEFAULT_BRANCH} OR VERSION_BRANCH MATCHES "release/.*") set(VERSION_STANDARD ${VERSION}) else() set(VERSION_STANDARD ${VERSION_FULL})