2014-03-23 01:37:41 +08:00
|
|
|
URCHIN=`which urchin`
|
|
|
|
SHELLS=sh bash dash ksh zsh
|
2014-05-11 00:59:34 +08:00
|
|
|
TEST_SUITE=fast
|
2014-03-23 01:37:41 +08:00
|
|
|
|
2014-07-10 16:51:36 +08:00
|
|
|
.PHONY: $(SHELLS) test verify-tag release
|
2014-03-23 01:37:41 +08:00
|
|
|
|
|
|
|
$(SHELLS):
|
|
|
|
@printf '\n\033[0;34m%s\033[0m\n' "Running tests in $@"
|
2014-05-11 00:59:34 +08:00
|
|
|
@$@ $(URCHIN) -f test/$(TEST_SUITE)
|
2014-03-23 01:37:41 +08:00
|
|
|
|
2014-05-11 01:03:50 +08:00
|
|
|
test: $(SHELLS)
|
2014-03-23 01:37:41 +08:00
|
|
|
@$(URCHIN) -f test/slow
|
|
|
|
|
2014-03-23 04:10:18 +08:00
|
|
|
default: test
|
|
|
|
|
2014-07-10 16:51:36 +08:00
|
|
|
verify-tag:
|
|
|
|
ifndef TAG
|
|
|
|
$(error TAG is undefined)
|
|
|
|
endif
|
|
|
|
|
|
|
|
release: verify-tag
|
|
|
|
@ OLD_TAG=`git describe --abbrev=0 --tags` && \
|
2014-07-18 16:49:57 +08:00
|
|
|
replace "$${OLD_TAG/v/}" "$(TAG)" -- nvm.sh install.sh README.markdown package.json && \
|
2014-07-17 15:25:14 +08:00
|
|
|
git commit -m "v$(TAG)" nvm.sh install.sh README.markdown package.json && \
|
|
|
|
git tag "v$(TAG)"
|
|
|
|
|