-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
33 lines (26 loc) · 806 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
PATH := node_modules/.bin:$(PATH)
SHELL := /bin/bash
NODE ?= $(shell which node)
YARN ?= $(shell which yarn)
PKG ?= $(if $(YARN),$(YARN),$(NODE) $(shell which npm))
.FORCE:
all: .FORCE
babel src -d lib
install: .FORCE
$(PKG) install
unit: .FORCE
mocha test/unit
integration: .FORCE
PREFIX=$(etcd_command_prefix) VERSION=$(etcd_image_version) docker-compose up -d
mocha test/integration
PREFIX=$(etcd_command_prefix) VERSION=$(etcd_image_version) docker-compose stop || echo 'failed to bring down containers'
PREFIX=$(etcd_command_prefix) VERSION=$(etcd_image_version) docker-compose rm -f || echo 'failed to remove containers'
lint: .FORCE
eslint src
eslint test
publish:
echo -e "${NPM_USERNAME}\n${NPM_PASSWORD}\n${NPM_EMAIL}" | npm login
npm publish
npm logout
clean: lib
rimraf lib