Skip to content

Commit

Permalink
chore(radio): Automate copyright year based on build date (#4579)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeerick authored Feb 1, 2024
1 parent 0d79d19 commit 6b6a12a
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set(VERSION_MAJOR "2")
set(VERSION_MINOR "10")
set(VERSION_REVISION "0")
set(CODENAME "dev")
string(TIMESTAMP BUILD_YEAR "%Y")

if(MINGW OR WIN32)
set(CMAKE_OBJECT_PATH_MAX 200)
Expand Down
2 changes: 0 additions & 2 deletions companion/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ include_directories(
)

############# Do macro replacements on input files #############
string(TIMESTAMP BUILD_YEAR "%Y")

configure_file(${COMPANION_SRC_DIRECTORY}/version.h.in ${CMAKE_BINARY_DIR}/version.h @ONLY)
configure_file(${COMPANION_SRC_DIRECTORY}/companion.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/companion.desktop @ONLY)
Expand Down Expand Up @@ -420,7 +419,6 @@ elseif(WIN32)
endif()
endif()

string(TIMESTAMP BUILD_YEAR "%Y")
set(LICENSE_FILE "${CMAKE_CURRENT_BINARY_DIR}/license.txt")
configure_file("${COMPANION_SRC_DIRECTORY}/../targets/windows/license.txt.in" ${LICENSE_FILE} @ONLY)
install(FILES "${LICENSE_FILE}" DESTINATION ${INSTALL_DESTINATION})
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/128x64/view_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const char ABOUT_VERSION_1[] = "EdgeTX " "(" VERSION_TAG ")" "\036\"" CODENAME "
#else
const char ABOUT_VERSION_1[] = "EdgeTX " "(" VERSION "-" VERSION_SUFFIX ")";
#endif
const char ABOUT_VERSION_2[] = "Copyright (C) 2024 EdgeTX";
const char ABOUT_VERSION_2[] = "Copyright (C) " BUILD_YEAR " EdgeTX";
const char ABOUT_VERSION_3[] = "https://edgetx.org";

void menuAboutView(event_t event)
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/212x64/view_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const char ABOUT_VERSION_1[] = "EdgeTX " "\"" CODENAME "\"" " (" VERSION_TAG ")"
#else
const char ABOUT_VERSION_1[] = "EdgeTX " "(" VERSION "-" VERSION_SUFFIX ")";
#endif
const char ABOUT_VERSION_2[] = "Copyright (C) 2024 EdgeTX";
const char ABOUT_VERSION_2[] = "Copyright (C) " BUILD_YEAR " EdgeTX";
const char ABOUT_VERSION_3[] = "https://edgetx.org";

void menuAboutView(event_t event)
Expand Down
2 changes: 1 addition & 1 deletion radio/src/gui/colorlcd/view_about.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const std::string about_str = "EdgeTX" " (" VERSION_TAG ")\n" "\"" CODENAME "\""
#else
const std::string about_str = "EdgeTX" " (" VERSION "-" VERSION_SUFFIX ")";
#endif
const std::string copyright_str = "Copyright (C) 2024 EdgeTX";
const std::string copyright_str = "Copyright (C) " BUILD_YEAR " EdgeTX";
const std::string edgetx_url = "https://edgetx.org";

AboutUs::AboutUs() :
Expand Down
1 change: 1 addition & 0 deletions radio/src/stamp.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
#define VERSION_MINOR @VERSION_MINOR@
#define VERSION_REVISION @VERSION_REVISION@
#define GIT_STR "@GIT_STR@"
#define BUILD_YEAR "@BUILD_YEAR@"

0 comments on commit 6b6a12a

Please sign in to comment.