Strubbl / wallabago

Go wrapper for the Wallabag API
GNU General Public License v3.0
11 stars 5 forks source link

make versionned releases #8

Closed anarcat closed 6 years ago

anarcat commented 7 years ago

hello again! :)

i was surprised to find an API change when my CI failed here... Turns out that GetEntries now needs a callback, which is fine, but i didn't expect such a change without a version number bump.

i encourage you to tag releases and use the semver.org standard for naming those versions. if there would have been a major (or even minor) version bump I would have been more careful before doing my own releases...

Strubbl commented 7 years ago

Sorry. Yes, you are right. I was too lazy so far. But in future i will version a bit more. But that would mean you will have to rely on tags instead of the head of master. Is that okay for you?

Strubbl commented 7 years ago

I have created two tags now. Current version is 1.0.0. The latest working version before i changed and added a lot of API calls is v0.1.0 So far i have only used git tags. I think it would make sense to put the version string somewhere in the source code, so that when you download the v0.1.0.zip, unzip it to the folder wallabago/ and later want to know which release it was, that would be helpful. But where to put a version number? In the readme only? Any idea or thoughts on that @anarcat ?

anarcat commented 7 years ago

Sorry. Yes, you are right. I was too lazy so far. But in future i will version a bit more. But that would mean you will have to rely on tags instead of the head of master. Is that okay for you?

Not sure what that means, but that's pretty much what i want i think. :)

I have created two tags now. Current version is 1.0.0. The latest working version before i changed and added a lot of API calls is v0.1.0

Thanks!

So far i have only used git tags. I think it would make sense to put the version string somewhere in the source code, so that when you download the v0.1.0.zip, unzip it to the folder wallabago/ and later want to know which release it was, that would be helpful. But where to put a version number? In the readme only? Any idea or thoughts on that @anarcat ?

I have done something for this in Wallabako. In the makefile, I have:

GFLAGS+=-ldflags="$(LDFLAGS) -X main.version=$(shell git describe --always --dirty)"

$(BINARY): *.go
    @echo building main program
    mkdir -p $$(dirname $(BINARY))
    go build $(GFLAGS) -o $@

and in the source:

var (
    // version is the program's version
    version = "undefined"
)

then i can just use that as a string... I wouldn't commit the version number in Git, that's just asking for trouble...

Strubbl commented 7 years ago

I think this does not work for a library because it is compiled as depencency and the makefile does not get executed.

I am going to use this method for my wallabg-stats binary

anarcat commented 7 years ago

true, not sure how that's done with libraries...

anarcat commented 6 years ago

i think this can be closed - you tagged releases, thanks! :)

Strubbl commented 6 years ago

i do not like the "v" in the tag name anymore. In future tags are coming without that, but old tags are still valid, too.