Add check to Makefile for scripts version mismatch
This commit is contained in:
parent
a28a24c053
commit
cd7ec87178
21
Makefile
21
Makefile
@ -1,15 +1,20 @@
|
||||
# Simple makefile to create a tarball of the msman helper scripts
|
||||
# Turn off verbose mode
|
||||
MAKEFLAGS += -s
|
||||
|
||||
all:
|
||||
source msman.sh
|
||||
source .msman/version.sh
|
||||
if [[ $CURRENT_SCRIPT_VERSION == $EXTRA_SCRIPTS_VERSION]]; then
|
||||
cp -r .msman msman
|
||||
tar -czf msman-hepler.tar.gz msman
|
||||
rm -rf msman
|
||||
else
|
||||
echo "msman.sh and .msman/version.sh are not in sync"
|
||||
CURRENT_SCRIPT_VERSION=`grep "CURRENT_SCRIPT_VERSION=" msman.sh | sed -e "s/CURRENT_SCRIPT_VERSION=//g"`; \
|
||||
EXTRA_VERSION=`grep "EXTRA_SCRIPTS_VERSION=" .msman/version.sh | sed -e "s/EXTRA_SCRIPTS_VERSION=//g"`; \
|
||||
if [ "$$CURRENT_SCRIPT_VERSION" != "$$EXTRA_VERSION" ]; then \
|
||||
echo "ERROR: The version in msman.sh and .msman/version.sh are not the same!"; \
|
||||
echo "ERROR: Please make sure they are the same."; \
|
||||
exit 1; \
|
||||
fi
|
||||
rm -rf msman
|
||||
mkdir msman
|
||||
cp -r .msman msman
|
||||
tar -czf msman-hepler.tar.gz msman
|
||||
rm -rf msman
|
||||
|
||||
clean:
|
||||
rm -rf msman
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user