Skip to content
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

Add -DVERSION flag for release version numbers #1194

Merged
merged 1 commit into from
Apr 26, 2017
Merged

Add -DVERSION flag for release version numbers #1194

merged 1 commit into from
Apr 26, 2017

Conversation

snoack
Copy link
Contributor

@snoack snoack commented Apr 26, 2017

Currently, the version number (as shown by sway --version and used in other places) is based on
git describe. But when packaging sway for Debian, where it is built outside of git, these information aren't available. Moreover, the version string contains information, such as date and branch, that aren't relevant for release builds, not to mention that the boilerplate to generate that version string is duplicated across the code base, which I fixed as well by having CMakeList.txt generate the version string. Finally, while on it, I also fixed the JSON version information in the IPC code.

Note that I removed the code path for when SWAY_GIT_VERSION and SWAY_GIT_BRANCH aren't defined. This was dead code anyway, as CMakeList.txt always defined these macros, but merely with an empty string if running outside of git. Moreover, I think it is preferable having the build fail if neither -DVERSION was given nor when building from git. Otherwise, package maintainers will easily forget to use -DVERSION.

@ddevault
Copy link
Contributor

You're removing information here, we still need the full git describe string for off-release builds.

@snoack
Copy link
Contributor Author

snoack commented Apr 26, 2017

I don't know what you mean. If -DVERSION isn't used, it is using the exact same version information as before my changes. If it does not, that wasn't indented, can you point me where information are removed?

@ddevault
Copy link
Contributor

You're right, I misread it. Thanks!

@ddevault ddevault merged commit 3c1fc00 into swaywm:master Apr 26, 2017
@snoack snoack deleted the version branch April 27, 2017 06:07
ddevault added a commit that referenced this pull request May 1, 2017
Add -DVERSION flag for release version numbers
@ddevault ddevault mentioned this pull request May 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants