Skip to content

Define fallback value for --version option#38

Merged
hailihu merged 1 commit intosara-nl:masterfrom
juanlufont:version-fix
Nov 29, 2024
Merged

Define fallback value for --version option#38
hailihu merged 1 commit intosara-nl:masterfrom
juanlufont:version-fix

Conversation

@juanlufont
Copy link
Contributor

The --version option relies on git describe command to determine the software version. This requires the script to be located within a valid git repository, which may not always be the case.

This patch tries to determine the software version using git and adds a fallback value (unknown) in case this is not possible.

Using the variable _VERSION_PLACEHOLDER allows third party tools such as Ansible to edit this specific line with the proper version at the time of deployment.

The `--version` option relies on `git describe` command to determine the
software version. This requires the script to be located within a valid
git repository, which may not always be the case.

This patch tries to determine the software version using git and adds a
fallback value (`unknown`) in case this is not possible.

Using the variable `_VERSION_PLACEHOLDER` allows third party tools such
as Ansible to edit this specific line with the proper version at the
time of deployment.
@hailihu hailihu merged commit 75a5d53 into sara-nl:master Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants