From 288235f59bd38050fdf9d207fbbf7935b4b85786 Mon Sep 17 00:00:00 2001 From: Diokuz Date: Tue, 27 Jun 2017 19:12:44 +0300 Subject: [PATCH 1/4] Move lint tasks before build --- ashes/Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ashes/Makefile b/ashes/Makefile index aaabe92093..e703592af3 100644 --- a/ashes/Makefile +++ b/ashes/Makefile @@ -52,12 +52,13 @@ tag: clean: rm -rf ./build/admin +# Do we actually need tests (not checks) on built aplication inside Ashes? .PHONY: test test: MSG=Testing -test: notify flow lint mocha +test: notify -.PHONY: t -t: flow lint mocha +.PHONY: check t +check t: flow lint mocha .PHONY: mocha-spec mocha-spec: @@ -141,4 +142,4 @@ prod p: clean build-prod .PHONY: build build: MSG=Building -build: notify clean install build-styleguide build-prod +build: notify clean install check build-styleguide build-prod From 99a80f55446116f0b8a642983f65918a5f715872 Mon Sep 17 00:00:00 2001 From: Diokuz Date: Tue, 27 Jun 2017 19:13:47 +0300 Subject: [PATCH 2/4] brake linter for test purposes --- ashes/src/components/promotions/sub-nav.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ashes/src/components/promotions/sub-nav.jsx b/ashes/src/components/promotions/sub-nav.jsx index 96a0a0baeb..4d1f0f947d 100644 --- a/ashes/src/components/promotions/sub-nav.jsx +++ b/ashes/src/components/promotions/sub-nav.jsx @@ -14,7 +14,7 @@ type SubNavProps = { applyType: string, }; -const SubNav = (props: SubNavProps) => { +const SubNav = (props: string) => { const params = { promotionId: props.promotionId, }; From 4ed3ee767937ebb5421150dccc15cca840ff7801 Mon Sep 17 00:00:00 2001 From: Diokuz Date: Tue, 27 Jun 2017 19:43:28 +0300 Subject: [PATCH 3/4] Revert "brake linter for test purposes" This reverts commit 99a80f55446116f0b8a642983f65918a5f715872. --- ashes/src/components/promotions/sub-nav.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ashes/src/components/promotions/sub-nav.jsx b/ashes/src/components/promotions/sub-nav.jsx index 4d1f0f947d..96a0a0baeb 100644 --- a/ashes/src/components/promotions/sub-nav.jsx +++ b/ashes/src/components/promotions/sub-nav.jsx @@ -14,7 +14,7 @@ type SubNavProps = { applyType: string, }; -const SubNav = (props: string) => { +const SubNav = (props: SubNavProps) => { const params = { promotionId: props.promotionId, }; From 5a891f319a700f4fbbd38556e2271649ac45934a Mon Sep 17 00:00:00 2001 From: Diokuz Date: Tue, 27 Jun 2017 19:57:38 +0300 Subject: [PATCH 4/4] test --- ashes/Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ashes/Makefile b/ashes/Makefile index e703592af3..6f8493f84b 100644 --- a/ashes/Makefile +++ b/ashes/Makefile @@ -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)) @@ -26,8 +27,8 @@ 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 @@ -35,8 +36,8 @@ 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) @@ -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: @@ -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 @@ -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 @@ -132,6 +139,7 @@ dev d: .PHONY: build-prod build-prod: + MSG="Building Application" make notify NODE_ENV=production webpack --progress .PHONY: prod p @@ -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