-
-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve version display #168
Conversation
…a deployed version or not Signed-off-by: DL6ER <[email protected]>
args.c
Outdated
char version[] = GIT_BRANCH; | ||
// Check if version is of format vX.YYY or vXX.YYY | ||
// '.' can never be part of a commit hash | ||
if(version[2] == '.' || version[3] == '.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be more future-proof?
if(strstr(version, ".") != NULL)
request.c
Outdated
@@ -1038,7 +1038,8 @@ void getVersion(int *sock) | |||
{ | |||
char server_message[SOCKETBUFFERLEN]; | |||
|
|||
if(strcmp(GIT_BRANCH, "master") == 0) | |||
char version[] = GIT_BRANCH; | |||
if(version[2] == '.' || version[3] == '.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See other comment
Signed-off-by: DL6ER <[email protected]>
This pull request has been mentioned on Pi-hole Userspace. There might be relevant details there: https://discourse.pi-hole.net/t/pi-hole-v3-2-1-released-with-lots-of-fixes/6096/1 |
By submitting this pull request, I confirm the following (please check boxes, eg [X]) Failure to fill the template will close your PR:
Please submit all pull requests against the
development
branch. Failure to do so will delay or deny your requestHow familiar are you with the codebase?:
10
Improve version display, fixes pi-hole/web#626
GIT_BRANCH
will either be a hash (like437af07
) or a tag (likev2.12
). Since.
can never be part of a commit hash, we detect if the version is either of the formatvX.YYY
orvXX.YYY
.This template was created based on the work of
udemy-dl
.