erofs-utils: use $EROFS_UTILS_VERSION, if set, as the version
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Fri, 16 Aug 2024 03:05:41 +0000 (05:05 +0200)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 16 Aug 2024 06:24:09 +0000 (14:24 +0800)
commitc469131828a5062eeb3047309cf69af55f6c7db4
tree743d4e93442cf1ad11a56a98652ec53f9bfad1d3
parent8305ee8d868d7045918ef2f2ab5df53851770d2c
erofs-utils: use $EROFS_UTILS_VERSION, if set, as the version

This lets downstreams embed the unpolluted downstream version;
when building the Debian package (from gbp) the resulting binary yields
  $ mkfs.erofs
  <E> erofs: missing argument: FILE
  mkfs.erofs 1.8.1-fead89d91-dirty
  Try 'mkfs.erofs --help' for more information.

Now, d/rules can
  export EROFS_UTILS_VERSION := $(shell IFS="$$IFS()" read -r _ v _ < debian/changelog; echo "$$v")
yielding
  $ mkfs.erofs
  <E> erofs: missing argument: FILE
  mkfs.erofs 1.8.1-1
  Try 'mkfs.erofs --help' for more information.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Link: https://lore.kernel.org/r/gho2b67qax222ewv5xb5cjkkgjgzftr3pyecl536g6jshcfexa@tarta.nabijaczleweli.xyz
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
scripts/get-version-number