Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/set next release to 0.10.0 #208

Merged
merged 22 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,11 @@ target_compile_definitions(projecteur PRIVATE
# Update this information - the version numbers and the version type.
# VERSION_TYPE must be either 'release' or 'develop'
set_target_properties(projecteur PROPERTIES
VERSION_MAJOR 1
VERSION_MINOR 0
VERSION_MAJOR 0
VERSION_MINOR 10
VERSION_PATCH 0
VERSION_TYPE develop
VERSION_DISTANCE_OFFSET 200
)
add_version_info(projecteur "${CMAKE_CURRENT_SOURCE_DIR}")

Expand Down
21 changes: 18 additions & 3 deletions cmake/modules/GitVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ function(get_version_info prefix directory)
set(${prefix}_VERSION_ISDIRTY 0 PARENT_SCOPE)
set(${prefix}_VERSION_BUILDTYPE "${CMAKE_BUILD_TYPE}" PARENT_SCOPE)
set(${prefix}_VERSION_DATE_MONTH_YEAR "" PARENT_SCOPE)
if("${${prefix}_VERSION_DISTANCE_OFFSET}" STREQUAL "")
set(${prefix}_VERSION_DISTANCE_OFFSET 0)
endif()

if("${${prefix}_OR_VERSION_MAJOR}" STREQUAL "")
set(${prefix}_OR_VERSION_MAJOR 0)
Expand Down Expand Up @@ -248,7 +251,10 @@ function(get_version_info prefix directory)
endif()

set(${prefix}_VERSION_FLAG ${${prefix}_VERSION_FLAG} PARENT_SCOPE)
set(${prefix}_VERSION_DISTANCE ${${prefix}_VERSION_DISTANCE} PARENT_SCOPE)

math(EXPR CALCULATED_GIT_DISTANCE "${${prefix}_VERSION_DISTANCE}+${${prefix}_VERSION_DISTANCE_OFFSET}")
set(${prefix}_VERSION_DISTANCE ${CALCULATED_GIT_DISTANCE})
set(${prefix}_VERSION_DISTANCE ${CALCULATED_GIT_DISTANCE} PARENT_SCOPE)

execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD
RESULT_VARIABLE resultSH
Expand Down Expand Up @@ -315,15 +321,18 @@ function(get_version_info prefix directory)
if(NOT ${${prefix}_VERSION_PATCH} EQUAL 0)
set(VERSION_STRING "${VERSION_STRING}.${${prefix}_VERSION_PATCH}")
endif()
if(NOT ON_MASTER OR NOT ${${prefix}_VERSION_DISTANCE} EQUAL 0)
if(NOT ON_MASTER OR NOT ${${prefix}_VERSION_DISTANCE} EQUAL ${${prefix}_VERSION_DISTANCE_OFFSET})
set(VERSION_STRING "${VERSION_STRING}-${${prefix}_VERSION_FLAG}")
set(VERSION_STRING_FULL "${VERSION_STRING_FULL}-${${prefix}_VERSION_FLAG}")
endif()
if(NOT ${${prefix}_VERSION_FLAG} STREQUAL "")
set(VERSION_STRING "${VERSION_STRING}.")
set(VERSION_STRING_FULL "${VERSION_STRING_FULL}.")
endif()
if(NOT ON_MASTER OR (NOT ON_MASTER AND NOT ${${prefix}_VERSION_DISTANCE} EQUAL 0))
if(NOT ON_MASTER OR (NOT ON_MASTER AND NOT ${${prefix}_VERSION_DISTANCE} EQUAL ${${prefix}_VERSION_DISTANCE_OFFSET}))
set(VERSION_STRING "${VERSION_STRING}${${prefix}_VERSION_DISTANCE}")
set(VERSION_STRING_FULL "${VERSION_STRING_FULL}${${prefix}_VERSION_DISTANCE}")
elseif(ON_MASTER AND NOT ${${prefix}_VERSION_DISTANCE} EQUAL ${${prefix}_VERSION_DISTANCE_OFFSET})
set(VERSION_STRING "${VERSION_STRING}${${prefix}_VERSION_DISTANCE}")
set(VERSION_STRING_FULL "${VERSION_STRING_FULL}${${prefix}_VERSION_DISTANCE}")
endif()
Expand Down Expand Up @@ -352,6 +361,7 @@ function(add_version_info_custom_prefix target prefix directory)
set(VERSION_PATCH 0)
set(VERSION_FLAG unknown)
set(VERSION_DISTANCE 0)
set(VERSION_DISTANCE_OFFSET 0)
set(VERSION_SHORTHASH unknown)
set(VERSION_FULLHASH unknown)
set(VERSION_STRING "0.0-unknown.0")
Expand All @@ -378,6 +388,11 @@ function(add_version_info_custom_prefix target prefix directory)
if(TARGET_VTYPE)
set(${prefix}_FALLBACK_VERSION_TYPE ${TARGET_VTYPE})
endif()
get_target_property(TARGET_VDIST_OFFSET ${target} VERSION_DISTANCE_OFFSET)
if(TARGET_VDIST_OFFSET)
set(VERSION_DISTANCE_OFFSET ${TARGET_VDIST_OFFSET})
endif()
set(${prefix}_VERSION_DISTANCE_OFFSET ${VERSION_DISTANCE_OFFSET})

include(ArchiveVersionInfo_${prefix} OPTIONAL RESULT_VARIABLE ARCHIVE_VERSION_PRESENT)
if(ARCHIVE_VERSION_PRESENT AND ${prefix}_VERSION_SUCCESS)
Expand Down
10 changes: 6 additions & 4 deletions doc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Projecteur Changelog

## v1.0
## v0.10.0

### Changes/Updates:

- Logitech Spotlight Bluetooth vibration & hidraw support ([#140][p140]);
- Logitech Spotlight Scrolling and Audio Volume functionality ([#85][i85]);
- Added automated builds for Fedora 34, Debian 11 (Bullseye) and OpenSUSE 15.3 ([#148][i148])
- Add automated builds for Fedora 34, Debian 11 (Bullseye) and OpenSUSE 15.3 ([#148][i148])
- Add automated builds for Fedora 37 and 38 / OpenSUSE 15.4 and 15.5
- Add automated builds for Ubuntu 23.04 and Debian Bookworm
- Bug fix for crash when closing the about dialog.

Many thanks to *[@mayanksuman][c-mayanksuman]* for Logitech Bluetooth, Scrolling and Audio volume
support.
Many thanks to *[@mayanksuman][c-mayanksuman]* for Logitech Bluetooth, Scrolling
and Audio volume support.

[p140]: https://github.com/jahnf/Projecteur/pull/140
[i85]: https://github.com/jahnf/Projecteur/issues/85
Expand Down