-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Makefile: pass docker build arguments #4212
Conversation
Dockerfile requires some --build-arg options. Fix "docker" target to pass them. Fix GIT_TAG to reflect the most recent tag related to HEAD, instead of an unrelated most recent tag. Use it as the image VERSION. Image tags need to be passed explicitly if needed: DOCKER_FLAGS='-t erigon:latest' make docker
@@ -3,7 +3,7 @@ GOBIN = $(CURDIR)/build/bin | |||
|
|||
GIT_COMMIT ?= $(shell git rev-list -1 HEAD) | |||
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) | |||
GIT_TAG ?= $(shell git describe --tags `git rev-list --tags="v*" --max-count=1`) | |||
GIT_TAG ?= $(shell git describe --tags --dirty) |
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.
FYI: mdbx using next snippet: git describe --tags --long --dirty=-dirty "--match=v[0-9]*"
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.
Can you try to fix this one also? #3779
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.
ah, now I remember why we using rev-list: because Ubuntu 18.04 has git of version which doesn't support --dirty flag
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.
Adding a --match
argument makes sense.
Updated PR description.
* allow --syncmode=snap for bor-mainnnet (#4206) * save * save * allow --syncmode=snap for bor-mainnnet #4206 * allow snap sync for mumbai chain (#4208) * save * mumbai * Bor: GetTransactionReceipt (#4209) * fixed miner.sigfile option (#4210) * Snap: reduced memory footprint on building huffman table (#4214) * save * save * save * save * Remove dependency on leveldb (#4213) * save * save * save * save * save * save * methods to read single txn by txnID (#4215) * It's safe now to open snapshots at app start (#4216) * removed obsolete trie variant (#4172) * up gods lib version (#4217) * Fix `rpc.BlockNumberOrHash` unmarshaling (#4218) * add test * fix unmarshaling bug Co-authored-by: Igor Mandrigin <[email protected]> * return err on invalid syncmode (#4219) * save * save * save * fixed kiln bug (#4221) * Clean headers pointers when removing links (#4222) * Clean headers pointers when removing links * Replace the lock Co-authored-by: Alexey Sharp <[email protected]> * Makefile: pass docker build arguments (#4212) Dockerfile requires some --build-arg options. Fix "docker" target to pass them. Fix GIT_TAG to reflect the most recent tag related to HEAD, instead of an unrelated most recent tag. Use it as the image VERSION. Image tags need to be passed explicitly if needed: DOCKER_FLAGS='-t erigon:latest' make docker * Update erigon-lib and version Co-authored-by: Alex Sharov <[email protected]> Co-authored-by: Giulio rebuffo <[email protected]> Co-authored-by: Artem Tsebrovskiy <[email protected]> Co-authored-by: Igor Mandrigin <[email protected]> Co-authored-by: Igor Mandrigin <[email protected]> Co-authored-by: Alexey Sharp <[email protected]> Co-authored-by: battlmonstr <[email protected]>
* allow --syncmode=snap for bor-mainnnet (#4206) * save * save * allow --syncmode=snap for bor-mainnnet #4206 * allow snap sync for mumbai chain (#4208) * save * mumbai * Bor: GetTransactionReceipt (#4209) * fixed miner.sigfile option (#4210) * Snap: reduced memory footprint on building huffman table (#4214) * save * save * save * save * Remove dependency on leveldb (#4213) * save * save * save * save * save * save * methods to read single txn by txnID (#4215) * It's safe now to open snapshots at app start (#4216) * removed obsolete trie variant (#4172) * up gods lib version (#4217) * Fix `rpc.BlockNumberOrHash` unmarshaling (#4218) * add test * fix unmarshaling bug Co-authored-by: Igor Mandrigin <[email protected]> * return err on invalid syncmode (#4219) * save * save * save * fixed kiln bug (#4221) * Clean headers pointers when removing links (#4222) * Clean headers pointers when removing links * Replace the lock Co-authored-by: Alexey Sharp <[email protected]> * Makefile: pass docker build arguments (#4212) Dockerfile requires some --build-arg options. Fix "docker" target to pass them. Fix GIT_TAG to reflect the most recent tag related to HEAD, instead of an unrelated most recent tag. Use it as the image VERSION. Image tags need to be passed explicitly if needed: DOCKER_FLAGS='-t erigon:latest' make docker * More header download diagnostics (#4224) Co-authored-by: Alexey Sharp <[email protected]> * Clean anchors, forward sort of headers (#4225) Co-authored-by: Alexey Sharp <[email protected]> Co-authored-by: Alex Sharov <[email protected]> Co-authored-by: Giulio rebuffo <[email protected]> Co-authored-by: Artem Tsebrovskiy <[email protected]> Co-authored-by: Igor Mandrigin <[email protected]> Co-authored-by: Igor Mandrigin <[email protected]> Co-authored-by: Alexey Sharp <[email protected]> Co-authored-by: battlmonstr <[email protected]>
Dockerfile requires some --build-arg options.
Fix "docker" target to pass them.
Fix GIT_TAG to reflect the most recent tag related to HEAD, instead of an unrelated most recent tag.
Use it as the image VERSION.
Image tags need to be passed explicitly if needed:
The rev-list usage wasn't correct, because in some cases the resulting GIT_TAG could be totally unrelated to the GIT_COMMIT we are building from. The describe logic is that it takes HEAD (or whatever you pass it), and follows the parent commit chain until it reaches some tag. The output is
<T>-<N>-<S>
where T is the found tag, N is the number of commits between T and HEAD, and S is the HEAD SHA. e.g.v2021.10.03-1119-g70c3aedf9
. Also the output is simplyT
if N = 0.The output will be
<T>-<N>-<S>-dirty
or<T>-dirty
if you have uncomitted changes in the working tree when building, e.g.v2021.10.03-1119-g70c3aedf9-dirty
.