Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Diokuz committed Jun 27, 2017
1 parent 4ed3ee7 commit 5a891f3
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions ashes/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export GIT_COMMIT = $(shell git rev-parse --short HEAD)
export URL_PREFIX = /admin
WEBPACK_PORT = 4001

.PHONY: notify
notify:
$(call header, $(MSG))

Expand All @@ -26,17 +27,17 @@ CFLAGS = -c -g -D $(NODE_ENV)
version = $(shell iojs -e "console.log(JSON.parse(require('fs').readFileSync('package.json')).version)")

.PHONY: docker
docker: MSG=Dockerizing
docker: notify
docker:
MSG=Dockerizing make notify
docker build -t $(DOCKER_IMAGE) . --build-arg NPM_TOKEN=${NPM_TOKEN}

.PHONY: docker-run
docker-run:
docker run -it -p 4000:4000 ashes:latest

.PHONY: docker-push
docker-push: MSG=Registering
docker-push: notify
docker-push:
MSG=Registering make notify
docker tag $(DOCKER_IMAGE) $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG)
docker push $(DOCKER_REPO)/$(DOCKER_IMAGE):$(DOCKER_TAG)

Expand All @@ -54,11 +55,15 @@ clean:

# Do we actually need tests (not checks) on built aplication inside Ashes?
.PHONY: test
test: MSG=Testing
test: notify
test:
MSG=Testing make notify

.PHONY: notify-check
notify-check:
MSG=Checking make notify

.PHONY: check t
check t: flow lint mocha
check t: notify-check flow lint mocha

.PHONY: mocha-spec
mocha-spec:
Expand Down Expand Up @@ -98,6 +103,7 @@ fmt-%:

.PHONY: build-styleguide
build-styleguide:
MSG="Building Styleguilde" make notify
styleguidist build --config styleguide/config.styleguide.js

.PHONY: styleguide sg
Expand All @@ -108,6 +114,7 @@ styleguide sg:

.PHONY: install i
install i:
MSG=Installing make notify
rm -rf ./node_modules
yarn cache clean
yarn --pure-lockfile
Expand All @@ -132,6 +139,7 @@ dev d:

.PHONY: build-prod
build-prod:
MSG="Building Application" make notify
NODE_ENV=production webpack --progress

.PHONY: prod p
Expand All @@ -141,5 +149,4 @@ prod p: clean build-prod
# Buildkite ###

.PHONY: build
build: MSG=Building
build: notify clean install check build-styleguide build-prod
build: clean install check build-styleguide build-prod

0 comments on commit 5a891f3

Please sign in to comment.