Skip to content

Commit

Permalink
Use program version from git tag
Browse files Browse the repository at this point in the history
This should fix issue #51.
  • Loading branch information
mvp committed Sep 20, 2017
1 parent 047bb1e commit 63122ba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ RM := rm -rf
CC ?= gcc
CFLAGS ?= -g -O0
CFLAGS += -Wall -Wextra -std=c99 -pedantic
GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
CFLAGS += -DPROGRAM_VERSION=\"$(GIT_VERSION)\"

ifeq ($(UNAME_S),Linux)
LDFLAGS += -Wl,-z,relro -lusb-1.0
Expand Down
3 changes: 1 addition & 2 deletions uhubctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*
*/

#define PROGRAM_VERSION "1.8"
#define _XOPEN_SOURCE 500

#include <stdio.h>
Expand Down Expand Up @@ -181,7 +180,7 @@ static const struct option long_options[] = {
int print_usage()
{
printf(
"uhubctl v%s: utility to control USB port power for smart hubs.\n"
"uhubctl %s: utility to control USB port power for smart hubs.\n"
"Usage: uhubctl [options]\n"
"Without options, show status for all smart hubs.\n"
"\n"
Expand Down

0 comments on commit 63122ba

Please sign in to comment.