Add git tags to build releases#12
Open
oliv3r wants to merge 1 commit into
Open
Conversation
This patch adds a new string to the boot-up message "Git version: xxx" indicating the git revision number, if the Makefile was able to run 'git describe'. First we see if we are on a tagged release, and use just the version tag as version. If we're not an tagged release, we try to get the exact hash. In case this fails, we try a fallback to get anything from git describe. If git describe is not available or the Makefile has trouble executing it, we do not store the version at all. Ideally we would overwrite the real version string, Marlin 1.0.0, but it has to be investigated if that is worth it, as some 3rd parties may relentlessly assume this string to identify Marlin. Note, that 'unclean/dirty' builds are postfixed with the -dirty flag, while this will never be seen in production, it is quite possible during development. On the OLED display will wrap the 'irty' bit onto an invisible line. Signed-off-by: Olliver Schinagl <o.schinagl@ultimaker.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds a new string to the boot-up message "Git version: xxx"
indicating the git revision number, if the Makefile was able to run 'git
describe'. First we see if we are on a tagged release, and use just the
version tag as version. If we're not an tagged release, we try to get
the exact hash. In case this fails, we try a fallback to get anything
from git describe.
If git describe is not available or the Makefile has trouble executing
it, we do not store the version at all.
Ideally we would overwrite the real version string, Marlin 1.0.0, but it
has to be investigated if that is worth it, as some 3rd parties may
relentlessly assume this string to identify Marlin.
Note, that 'unclean/dirty' builds are postfixed with the -dirty flag,
while this will never be seen in production, it is quite possible during
development. On the OLED display will wrap the 'irty' bit onto an
invisible line.
Note, that this was once part of JediMarlin commit 625f192
("Add git tags to build releases") but was unnecessarily removed in
commit 1a6a90e ("Start with supercleaning action, delete all unused code.")
Signed-off-by: Olliver Schinagl o.schinagl@ultimaker.com