-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
46 lines (37 loc) · 1.13 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
# This Makefile does not contain any build steps
# It only groups scripts to use in project
MAKEFLAGS += --warn-undefined-variables
SHELL := /bin/sh # for compatibility (mainly with redhat distros)
.SHELLFLAGS := -ec
PROJECT_DIR := $(realpath $(dir $(abspath $(MAKEFILE_LIST))))
BUNDLE_ENV := BUNDLE_DISABLE_SHARED_GEMS=true BUNDLE_PATH__SYSTEM=false BUNDLE_PATH="$(PROJECT_DIR)/jekyll/.bundle" BUNDLE_GEMFILE=$(PROJECT_DIR)/jekyll/Gemfile
.POSIX:
.DEFAULT: all
.PHONY: all
all: bootstrap build
.PHONY: bootstrap
bootstrap:
npm ci
@$(MAKE) -C$(PROJECT_DIR)/web bootstrap
.PHONY: lint
lint:
npm run lint
@$(MAKE) -C$(PROJECT_DIR)/web lint
.PHONY: fmt
fmt:
npm run fmt
.PHONY: build
build:
@$(MAKE) -C$(PROJECT_DIR)/web build
.PHONY: test-prod
test-prod:
npm ci --prefix tests
BASE_URL=https://matejkosiarcik.com npm test --prefix tests
npm ci --prefix visual-tests
BASE_URL=https://matejkosiarcik.com npm test --prefix visual-tests
.PHONY: test-local
test-local:
npm ci --prefix tests
BASE_URL=http://localhost:8888 npm test --prefix tests
npm ci --prefix visual-tests
BASE_URL=http://localhost:8888 npm test --prefix visual-tests