-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Automatically generated version on build #91
Comments
In our project we use
|
+1 for using `git describe` (maybe `git describe --always` in case
tags are not present). NOTE: at the moment, tags are not present...
|
It seems it's a good idea |
So we should create a make.bash & make.bat instead a Makefile? @tboerger |
We can accomplish that with the Makefile as well, I would just add the version part to it. |
Makefile ask people to install make system first. Many gophers come from Ruby and Python not C or C++. And since build Gitea is so easy that it's no need a Makefile. Or we can move it to 1.1.0? |
+1 to move it to 1.1.0
BTW, we still need version embedded in a .go file for "go get"
to end up with a proper version printed in pages, no ?
|
Go get should simply have 0.0.0+master |
But most gophers also got build-essentials installed which also includes make |
On Mon, Nov 07, 2016 at 06:31:56AM -0800, Thomas Boerger wrote:
How about 1.0.0-dev, and incremented after release ? |
Because we should always provide valid version numbers. |
is |
Yes |
According to which specification is `1.0.0-dev` invalid ?
Should maybe be `1.0.0+dev` or something similar ?
|
go build on branch master: 1.0+dev make on branch master: 1.0+hash |
@lunny that means never having the commit-hash ! |
These are my 2 cents, because we should always keep valid semver versions: go build on branch master: 1.0.0+dev, 1.1.0+dev, 1.2.0+dev make on branch master: 1.0.0+dev, 1.1.0+dev, 1.2.0+dev These are also valid versions for most packages like rpm or deb. Edit: Maybe we should even stick with Edit: And maybe |
On Mon, Nov 07, 2016 at 07:26:56AM -0800, Thomas Boerger wrote:
+1, it works for me. |
I think only |
@lunny that'd be even better but I'm afraid |
* Faster commit lookup * Fix copy/rename bug * Comment * Use defer
I think we can learn Golang's version management.
On master, all the version numbers will be gave on build and the version number is the commit hash. Since the hash is too long, we can use the first 7 characters. i.e. tip+2b445c7
On release branch, all the version number will be gave on build and the version number is branch name plus git hash. i.e. 1.0+2b445c7
For a tag version i.e. 1.0.0, the version number could be static and we can give it a special number not a git hash.
So that, when a user report an issue, we can know the question is from which version quickly.
The text was updated successfully, but these errors were encountered: