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

Fixes for build system (notably the version number) #23

Merged
merged 2 commits into from
Apr 7, 2018

Conversation

StefansM
Copy link
Contributor

@StefansM StefansM commented Apr 6, 2018

Fixes the issue with git describe described in the review of #22. It's still a mystery to me how I built the 1.0.0 tarball.

Also fixes *_LDFLAGS in Makefile.am: I was passing WARN_CFLAGS rather than WARN_LDFLAGS.

StefansM added 2 commits April 6, 2018 22:08
GitHub uses lightweight tags to describe releases (for some reason), so
the `git describe --always` command line in `AC_INIT` was always
returning an abbreviated commit ID. The version is now set by `git
describe --always --tags --dirty`.

The `--tags` option will cause `git describe` to correctly pick up
lightweight tags. The `--dirty` option will append `-dirty` on a dirty
working tree, so that `make dist` on an edited release tag will build a
tarball like `pipes-c-1.0.0-dirty.tar.gz`. This will hopefully prevent
confusion and will cause `-Werror` to be added to the compiler flags
correctly for non-release builds.
I was incorrectly passing `WARN_CFLAGS` to `*_LDFLAGS`, rather than
`WARN_LDFLAGS`.
@livibetter
Copy link
Contributor

@StefansM

I'm confused by

GitHub uses lightweight tags to describe releases (for some reason), [...]

Did you mean: Git uses annotated tags to git-describe by default, if without --tags?

If you did mean GitHub, I've just created a test repository, GitHub does recognize both lightweight and annotated tags as releases. I tagged 3, 2 annotated and 1 lightweight. GitHub showed 3 releases and 3 tags. And the annotated tags' messages were also used in Releases (formatted in pre-like block just as commit message)

Anyway, I think annotated tags are better, because I wasn't entirely happy with only putting release notes in GitHub Release as it's not portable (or not with repository in other words), with annotated tags, that will be resolved. Furthermore, git-tag(1) is telling me that I've been using lightweight tags wrong:

Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels. For this reason, some git commands for naming objects (like git describe) will ignore lightweight tags by default.

I am going to add the use of it in release process of pipes.sh, and stop using lightweight tags as release tags.

@StefansM
Copy link
Contributor Author

StefansM commented Apr 7, 2018

GitHub uses lightweight tags to describe releases (for some reason), [...]

Did you mean: Git uses annotated tags to git-describe by default, if without --tags?

Both: if I create a release using the GitHub web UI, GitHub creates a lightweight tag. The git describe command, by default, only looks for annotated tags, so it doesn't see tags made by GitHub unless --tags is given.

Anyway, I think annotated tags are better [for releases]

Definitely agreed. This seems so clear that I just assumed GitHub was creating an annotated tag for a release. It didn't even occur to me that it would (mis)use lightweight tags to do so!

I am going to add the use of it in release process of pipes.sh, and stop using lightweight tags as release tags.

I will do the same. In fact, I think I must have created an annotated tag on my local fork to build the 1.0.0 tarball, and then deleted it in favour of using the web UI. I won't rewrite history in the repo, but all future releases will be annotated. I will bump the version number to 1.0.1 for this PR.

@StefansM StefansM merged commit 13442f6 into pipeseroni:master Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants