mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 12:43:36 +00:00
rustc: Print a smaller hash on -v
The long hash just takes up space and you can discover the main hash through the `rustc --version verbose` command.
This commit is contained in:
parent
1607064cfe
commit
a491551597
@ -112,8 +112,8 @@ HTML_DEPS += doc/version_info.html
|
||||
doc/version_info.html: $(D)/version_info.html.template $(MKFILE_DEPS) \
|
||||
$(wildcard $(D)/*.*) | doc/
|
||||
@$(call E, version-info: $@)
|
||||
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(shell echo \
|
||||
$(CFG_VER_HASH) | head -c 8)/;\
|
||||
$(Q)sed -e "s/VERSION/$(CFG_RELEASE)/; s/SHORT_HASH/$(\
|
||||
CFG_SHORT_VER_HASH)/;\
|
||||
s/STAMP/$(CFG_VER_HASH)/;" $< >$@
|
||||
|
||||
GENERATED += doc/version.tex doc/version_info.html
|
||||
|
@ -46,7 +46,8 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT))),)
|
||||
ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
|
||||
CFG_VER_DATE = $(shell git --git-dir='$(CFG_GIT_DIR)' log -1 --pretty=format:'%ci')
|
||||
CFG_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse HEAD)
|
||||
CFG_VERSION += ($(CFG_VER_HASH) $(CFG_VER_DATE))
|
||||
CFG_SHORT_VER_HASH = $(shell git --git-dir='$(CFG_GIT_DIR)' rev-parse --short=9 HEAD)
|
||||
CFG_VERSION += ($(CFG_SHORT_VER_HASH) $(CFG_VER_DATE))
|
||||
endif
|
||||
endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user