-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
build: include commit hash & version #2453
Conversation
IIRC there was API version comparison somewhere, IMO it should work among the same pre-release, different commit metadata. You can try it by building, starting daemon, adding commit, building, trying to use |
Travis uses quite outdated docker (1.8.2) which doesn't support build arguments (appeared in 1.9.0). I was unable to upgrade docker in Travis environment so I've just replaced Once Travis refreshes its docker (they promised to keep it updated), we can go back to build arguments and pass the version via cmdline: @Kubuxu I checked, client and server versions should match and it's about version tags like |
However, client and daemon with different version number / pre-release will not be able to communicate. |
Right, sorry for trouble. Go/Bash LGTM, but I can't say anything about docker. |
@lgierth Are you fine with Dockerfile changes? There's an important one: to build an image from source code, Docker 1.9+ is now required. A workaround for Travis is created. |
License: MIT Signed-off-by: Thomas Gardner <tmg@fastmail.com>
License: MIT Signed-off-by: Thomas Gardner <tmg@fastmail.com>
License: MIT Signed-off-by: Thomas Gardner <tmg@fastmail.com>
License: MIT Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
IPFS version is taken from git describe output. Done for Makefile and Dockerfile License: MIT Signed-off-by: hutenosa <hutenosa@mm.st>
fixed bug in main Makefile added make target 'docker' travis docker workaround License: MIT Signed-off-by: hutenosa <hutenosa@mm.st>
License: MIT Signed-off-by: dignifiedquire <dignifiedquire@gmail.com>
License: MIT Signed-off-by: Jeromy Johnson <why@ipfs.io>
License: MIT Signed-off-by: Jeromy Johnson <why@ipfs.io>
License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
(not green, but at least it executes) License: MIT Signed-off-by: Tarnay Kálmán <kalmisoft@gmail.com>
License: MIT Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
License: MIT Signed-off-by: Lars Gierth <larsg@systemli.org>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Michael Muré <batolettre@gmail.com>
License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
License: MIT Signed-off-by: Jeromy <jeromyj@gmail.com>
This way, we don't claim to pin when unpinning. License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
…ype` License: MIT Signed-off-by: Steven Allen <steven@stebalien.com>
// CurrentCommit is the current git commit, this is set as a ldflag in the Makefile | ||
var CurrentCommit string | ||
|
||
// CurrentVersionNumber is the current application's version literal | ||
const CurrentVersionNumber = "0.4.0-dev" | ||
var CurrentVersionNumber = "0.0.0-dev" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CurrentVersionNumber
should stay as it is and not carry commit information -- it's used in too many places where the assumption is a simple vN.N.N string. Maybe just use CurrentCommit?
Hey @hutenosa I'm so sorry for letting this sit so long. I like this PR very much! I think this can be simplified a bit, by not touching CurrentVersionNumber,
I can help you out with a few of these any time. Regarding git, I haven't found a way to use git describe without a full repo, |
I'm closing this PR since I deleted the forked repository. Unfortunately, github has no means to rebind the PR to a new fork. I'll resubmit a new one shortly. |
(partially) fixes #2304
New script
bin/genversion
generates SemVer-compatible string out of closest git tag. The script is called in Makefile to pass IPFS version and commit info as linker arguments.Dockerfiles got optional build argument
IPFS_VERSION
to avoid including.git/
into the image.License: MIT
Signed-off-by: hutenosa hutenosa@mm.st