Merge pull request #1194 from snoack/version

Add -DVERSION flag for release version numbers
This commit is contained in:
Drew DeVault 2017-04-26 10:18:03 -04:00
parent 16a3bf1e4a
commit 06446b611a
7 changed files with 19 additions and 64 deletions

View file

@ -63,11 +63,7 @@ int main(int argc, char **argv) {
bar_id = strdup(optarg);
break;
case 'v':
#if defined SWAY_GIT_VERSION && defined SWAY_GIT_BRANCH && defined SWAY_VERSION_DATE
fprintf(stdout, "sway version %s (%s, branch \"%s\")\n", SWAY_GIT_VERSION, SWAY_VERSION_DATE, SWAY_GIT_BRANCH);
#else
fprintf(stdout, "version not detected\n");
#endif
fprintf(stdout, "sway version " SWAY_VERSION "\n");
exit(EXIT_SUCCESS);
break;
case 'd': // Debug