Commit 1af28857 authored by Guillaume Roguez's avatar Guillaume Roguez Committed by aviau

new release display and information

This patch changes the way to display the release information.
Also update the release name to Louis Riel - beta2

Now the revision is replaced by the build date.

This value is generated as following pseudo-code:

if SOURCE_DATE_EPOCH is set
  it's value must be a number of seconds since epoch.
  it's used to generate the final build date displayed.
else if RING_CLIENT_BUILD_DATE is set
  it's value is used as-it as the final build date displayed.
else
  the current date of the system is used to generate the final build date displayed.
Reviewed-by: default avatarAlexandre Viau <alexandre.viau@savoirfairelinux.com>
Change-Id: Ifa431b8fa4f8945cf9a25fef028712ad0e40a0f3
parent d8343e66
......@@ -19,6 +19,21 @@ SET(PROJECT_VERSION_MAJOR 1)
SET(PROJECT_VERSION_MINOR 0)
SET(PROJECT_VERSION_PATCH 0)
# set build date
IF( NOT ("$ENV{SOURCE_DATE_EPOCH}" STREQUAL ""))
EXECUTE_PROCESS(
COMMAND date -u -d "1970-01-01 UTC $ENV{SOURCE_DATE_EPOCH} seconds" "+%Y-%m-%d %H:%M:%S UTC"
OUTPUT_VARIABLE RING_CLIENT_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ELSEIF( "${RING_CLIENT_BUILD_DATE}" STREQUAL "")
EXECUTE_PROCESS(
COMMAND date -u "+%Y-%m-%d %H:%M:%S UTC"
OUTPUT_VARIABLE RING_CLIENT_BUILD_DATE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ENDIF()
# add the binary tree to the search path for include files
# so that we will find config.h
INCLUDE_DIRECTORIES("${PROJECT_BINARY_DIR}")
......@@ -214,6 +229,7 @@ ADD_CUSTOM_TARGET(
COMMAND ${CMAKE_COMMAND}
-DGIT_REVISION_INPUT_FILE=${GIT_REVISION_INPUT_FILE}
-DGIT_REVISION_OUTPUT_FILE=${GIT_REVISION_OUTPUT_FILE}
-DRING_CLIENT_BUILD_DATE=${RING_CLIENT_BUILD_DATE}
-P ${CMAKE_SOURCE_DIR}/cmake/GitRevision.cmake
COMMENT "generating ${GIT_REVISION_OUTPUT_FILE}"
)
......
......@@ -81,8 +81,9 @@ ring_about_dialog(GtkWidget *parent)
}
gchar *name = g_strdup_printf("Gnome Ring");
gchar *version = g_strdup_printf(C_("Do not translate the release name", "release: Louis-Joseph Papineau\nv%d.%d.%d - %.10s"),
VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, RING_CLIENT_REVISION);
gchar *version = g_strdup_printf(C_("Do not translate the release name nor the status (beta, final, ...)",
"release: Louis Riel - beta 2\nbuilt on %.25s"),
RING_CLIENT_BUILD_DATE);
const gchar *authors[] = {
[0] = "Adrien Béraud",
......
/* cmake will generate revision.h with a define containing the git revision (if found) */
#define RING_CLIENT_REVISION "@RING_CLIENT_REVISION@"
#define RING_CLIENT_BUILD_DATE "@RING_CLIENT_BUILD_DATE@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment