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

Use the date in GitHub snapshots #533

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion cmake/DetermineVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ function(determine_version source_dir git_command var_prefix)
set (${var_prefix}_VERSION_IS_RELEASE FALSE PARENT_SCOPE)
endif()
else()
# snapshot, so use the date
string(TIMESTAMP date "%Y%m%d" UTC)
set (patch_extra "${date}")
set (${var_prefix}_VERSION_PATCH_EXTRA ${patch_extra} PARENT_SCOPE)
set (${var_prefix}_VERSION "${${var_prefix}_VERSION_MAJOR}.${${var_prefix}_VERSION_MINOR}.${${var_prefix}_VERSION_PATCH}-${patch_extra}" PARENT_SCOPE)
message(STATUS
"Could not use git to determine source version, using version ${${var_prefix}_VERSION}"
)
endif()
endfunction()
endfunction()
Loading