Skip to content

Commit d539149

Browse files
committed
mk: Put the version number somewhere discoverable in the installer
The binaries for some release channels to not contain the version number, which makes it hard for scripts to determine the version number.
1 parent b16111f commit d539149

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

mk/dist.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ distcheck-osx: dist-osx
212212
# Unix binary installer tarballs
213213
######################################################################
214214

215-
NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md
215+
NON_INSTALLED_PREFIXES=COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,version
216216

217217
define DEF_INSTALLER
218218

@@ -236,6 +236,8 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
236236
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-APACHE $$(PREPARE_DEST_DIR)/share/doc/rust
237237
$$(Q)$$(PREPARE_MAN_CMD) $$(S)LICENSE-MIT $$(PREPARE_DEST_DIR)/share/doc/rust
238238
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)/share/doc/rust
239+
# This tiny morsel of metadata is used by rust-packaging
240+
$$(Q)echo "$(CFG_VERSION)" > $$(PREPARE_DEST_DIR)/version
239241

240242
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
241243
@$(call E, build: $$@)

0 commit comments

Comments
 (0)