mirror of
https://github.com/qdm12/ddns-updater.git
synced 2026-08-02 10:38:41 -04:00
Feature request: Add a --version parameter #364
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @yorickdowne on GitHub (Feb 5, 2024).
I'd be helpful to be able to call
/updater/app --versionand have it print out its version and quit.This would assist us in our Ansible/IaC rollout, where we use this as a sanity check for the tech running the Ansible playbook
@qdm12 commented on GitHub (Feb 8, 2024):
Sure! I have some code doing the following:
if the first argument to the program is
version,-versionor--version, print on a new line:v2.6.0if the version is set (only set on releases)latest-0abcdeffor commits on the master branchunknownif the version is not set at all, for example when building the program locallyWould that work/suffice?
I could eventually have it as
v2.6.0-0abcdeffor a commit after a certain release, but that is tedious to get right (and have the CI enforce this is properly hardcoded in the code etc.)@yorickdowne commented on GitHub (Feb 8, 2024):
That’s great. No need to cut a release just for this feature.
@qdm12 commented on GitHub (Feb 8, 2024):
Actually I went ahead to work on having:
I'll let you know once it's ready.
@qdm12 commented on GitHub (Feb 8, 2024):
Done in
4499d87e05In the end, I reverted since it was getting over-complicated to keep track of the previous last release. So it's again:
v2.6.0if the version is set (only set on releases)latest-0abcdeffor commits on the master branchunknownif the version is not set at all, for example when building the program locally