Makefile, scstadmin/Makefile: Use git sha1 as the SCST revision

git sha1 is a more convenient way to generate a revision than the number
of commits. Also, remove svn repository support.
This commit is contained in:
Gleb Chesnokov
2023-01-09 23:26:30 +03:00
parent 3d1dd5c90a
commit 7b0a2f8e69
2 changed files with 2 additions and 12 deletions

View File

@@ -70,12 +70,7 @@ EMULEX_DIR=emulex
ISCSI_DIR=iscsi-scst
REVISION ?= $(shell if [ -e .svn ]; then \
svn info | sed -n 's/^Revision:[[:blank:]]*/./p'; \
elif [ -e .git ]; then \
echo -n .; \
git log | grep -c ^commit; \
fi)
REVISION ?= $(shell if [ -e .git ]; then echo -n .; git rev-parse --short HEAD 2>/dev/null; fi)
VERSION_WITHOUT_REVISION := $(shell echo -n "$$(sed -n 's/^\#define[[:blank:]]SCST_VERSION_NAME[[:blank:]]*\"\([^-]*\).*\"/\1/p' scst/include/scst_const.h)")
VERSION := $(VERSION_WITHOUT_REVISION)$(REVISION)
DEBIAN_REVISION=1.1

View File

@@ -2,12 +2,7 @@ ifndef PREFIX
PREFIX=/usr/local
endif
REVISION ?= $(shell if [ -e .svn ]; then \
svn info | sed -n 's/^Revision:[[:blank:]]*/./p'; \
elif [ -e .git ]; then \
echo -n .; \
git log | grep -c ^commit; \
fi)
REVISION ?= $(shell if [ -e .git ]; then echo -n .; git rev-parse --short HEAD 2>/dev/null; fi)
VERSION = $(shell echo -n "$$(sed -n 's/^[[:blank:]]*\$$VERSION[[:blank:]]*=[[:blank:]]*[\"'"'"']\([0-9.]*\)[\"'"'"'];$$/\1/p' scstadmin/scst-*/lib/SCST/SCST.pm)$(REVISION)")
SCSTADMIN_DIR = $(shell if [ ! -h scstadmin ]; then \