Merge pull request #1634 from callahad/bats
bats is available in homebrew
This commit is contained in:
18
tests.mk
18
tests.mk
@@ -1,10 +1,12 @@
|
|||||||
|
SYSTEM := $(shell sh -c 'uname -s 2>/dev/null')
|
||||||
|
|
||||||
shellcheck:
|
shellcheck:
|
||||||
ifeq ($(shell shellcheck > /dev/null 2>&1 ; echo $$?),127)
|
ifneq ($(shell shellcheck --version > /dev/null 2>&1 ; echo $$?),0)
|
||||||
ifeq ($(shell uname),Darwin)
|
ifeq ($(SYSTEM),Darwin)
|
||||||
brew install shellcheck
|
brew install shellcheck
|
||||||
else
|
else
|
||||||
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
|
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse'
|
||||||
sudo apt-get update && sudo apt-get install -y shellcheck
|
sudo apt-get update && sudo apt-get install -y shellcheck
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -53,9 +55,15 @@ ifeq ($(shell grep dokku.me /home/dokku/VHOST 2>/dev/null),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
bats:
|
bats:
|
||||||
|
ifneq ($(shell bats --version > /dev/null 2>&1 ; echo $$?),0)
|
||||||
|
ifeq ($(SYSTEM),Darwin)
|
||||||
|
brew install bats
|
||||||
|
else
|
||||||
git clone https://github.com/sstephenson/bats.git /tmp/bats
|
git clone https://github.com/sstephenson/bats.git /tmp/bats
|
||||||
cd /tmp/bats && sudo ./install.sh /usr/local
|
cd /tmp/bats && sudo ./install.sh /usr/local
|
||||||
rm -rf /tmp/bats
|
rm -rf /tmp/bats
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
# these are disabled due to their expansive existence in the codebase. we should clean it up though
|
# these are disabled due to their expansive existence in the codebase. we should clean it up though
|
||||||
|
|||||||
Reference in New Issue
Block a user