Skip to content

Display the build date in the editor and when starting the engine#59247

Merged
akien-mga merged 1 commit intogodotengine:masterfrom
Calinou:editor-display-build-date
Feb 27, 2024
Merged

Display the build date in the editor and when starting the engine#59247
akien-mga merged 1 commit intogodotengine:masterfrom
Calinou:editor-display-build-date

Conversation

@Calinou
Copy link
Copy Markdown
Member

@Calinou Calinou commented Mar 17, 2022

This can be used to quickly see how recent a development build is, without having to look up the commit date manually. When juggling around with various builds (e.g. for benchmarking), this can also be used to ensure that you're actually running the binary you intended to run.

The date stored is the date of the Git commit that is built, not the current date at the time of building the binary. This ensures binaries can remain reproducible.

The version timestamp can be accessed using the timestamp key of the Engine.get_version_info() return value.

I've tested all possible scenarios and they all build successfully:

  • git in PATH, .git/ folder present (the only scenario in which VERSION_TIMESTAMP is not 0).
  • git not in PATH, git/ folder present.
  • git in PATH, .git/ folder not present.
  • git not in PATH, git/ folder not present.

Preview

$ godot --quit
Godot Engine v4.0.alpha.custom_build.f78de4d1a (2022-03-12 02:35:20 UTC) - https://godotengine.org
Vulkan API 1.2.189 - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GTX 1080

@Calinou Calinou requested review from a team as code owners March 17, 2022 18:45
@Calinou Calinou added this to the 4.0 milestone Mar 17, 2022
Comment thread core/version.h Outdated
Comment thread doc/classes/Engine.xml Outdated
Comment thread editor/project_manager.cpp Outdated
@Calinou Calinou force-pushed the editor-display-build-date branch 2 times, most recently from 5b718ac to 082dad5 Compare March 17, 2022 23:27
@YuriSizov YuriSizov modified the milestones: 4.0, 4.1 Feb 9, 2023
@YuriSizov YuriSizov modified the milestones: 4.1, 4.2 Jun 14, 2023
@AThousandShips AThousandShips modified the milestones: 4.2, 4.3 Oct 26, 2023
@Calinou Calinou force-pushed the editor-display-build-date branch 2 times, most recently from 34a6b50 to 945b26d Compare January 11, 2024 00:30
Copy link
Copy Markdown
Member

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use a rebase, somehow. It's a shame it has to be on the backburner and be rebased for so long. Perhaps it's just... no interest at all?

@Calinou Calinou force-pushed the editor-display-build-date branch from 945b26d to ce6ffaf Compare February 26, 2024 22:53
@Calinou Calinou requested review from a team as code owners February 26, 2024 22:53
Comment thread main/main.cpp Outdated
Comment on lines 2488 to 2489
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a workaround for #36252 (comment), which we could remove once we have support for stripping ANSI escape codes in RotatedFileLogger.

@Calinou
Copy link
Copy Markdown
Member Author

Calinou commented Feb 26, 2024

Rebased and tested again, it works as expected.

Comment thread editor/editor_about.cpp Outdated
Copy link
Copy Markdown
Member

@KoBeWi KoBeWi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation looks ok.

@Mickeon
Copy link
Copy Markdown
Member

Mickeon commented Feb 27, 2024

Needs to be rebased once more for the Engine docs rework on that part specifically.

Comment thread core/version.h Outdated
@Calinou Calinou force-pushed the editor-display-build-date branch from ce6ffaf to 63784aa Compare February 27, 2024 16:54
Comment thread doc/classes/Engine.xml Outdated
This can be used to quickly see how recent a development build is,
without having to look up the commit date manually.
When juggling around with various builds (e.g. for benchmarking),
this can also be used to ensure that you're actually running the
binary you intended to run.

The date stored is the date of the Git commit that is built, not
the current date at the time of building the binary. This ensures
binaries can remain reproducible.

The version timestamp can be accessed using the `timestamp` key
of the `Engine.get_version_info()` return value.
@Calinou Calinou force-pushed the editor-display-build-date branch from 63784aa to 67e9ccd Compare February 27, 2024 19:39
@akien-mga akien-mga merged commit 1aa8e91 into godotengine:master Feb 27, 2024
@akien-mga
Copy link
Copy Markdown
Member

Thanks!

@Calinou Calinou deleted the editor-display-build-date branch March 12, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants