update copyright and license year automatically

This commit is contained in:
Martin Marmsoler 2023-01-23 09:50:50 +01:00
parent 627f73d9fd
commit c2c84d27f6
4 changed files with 10 additions and 3 deletions

View File

@ -10,6 +10,11 @@ set(GITTYUP_VERSION
"${GITTYUP_VERSION_MAJOR}.${GITTYUP_VERSION_MINOR}.${GITTYUP_VERSION_PATCH}"
)
string(TIMESTAMP CURR_YEAR "%Y")
add_compile_definitions(CURR_YEAR=${CURR_YEAR})
configure_file(${CMAKE_SOURCE_DIR}/LICENSE.md.in ${CMAKE_BINARY_DIR}/LICENSE.md
@ONLY)
# Write version to file so it can be used also from external, for example in the
# github manifest
file(WRITE "${CMAKE_BINARY_DIR}/Version.txt" ${GITTYUP_VERSION})

View File

@ -1,7 +1,7 @@
MIT License
Copyright (c) 2018 Scientific Toolworks, Inc.
Copyright (c) 2021-2022 Gittyup contributors
Copyright (c) 2021-@CURR_YEAR@ Gittyup contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -283,7 +283,7 @@ set(CPACK_PACKAGE_VERSION_MINOR ${GITTYUP_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${GITTYUP_VERSION_PATCH})
if(WIN32)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE.md)
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_BINARY_DIR}/LICENSE.md)
endif()
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -42,7 +42,9 @@ const QString kSubtitleFmt = "<h4 style='margin-top: 0px; color: gray'>%2</h4>";
const QString kTextFmt =
"<p style='white-space: nowrap'><b style='font-size: large'>%1 v%2</b> "
"- %3 - %4<br>Copyright © 2021-2022 Gittyup contributors"
"- %3 - %4<br>Copyright © 2021-" +
QString::number(CURR_YEAR) +
" Gittyup contributors"
"<br>Copyright © 2016-2020 Scientific Toolworks, Inc. and "
"contributors</p><p> If you have a question that might benefit the "
"community, consider asking it on <a href='%5'>Stack Overflow</a> by "