mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-23 21:51:27 +00:00
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:
7
Makefile
7
Makefile
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user