forked from yarnpkg/website
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (40 loc) · 1.06 KB
/
Copy pathMakefile
File metadata and controls
52 lines (40 loc) · 1.06 KB
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
47
48
49
50
51
52
.PHONY: start install serve build i18n-upload i18n-download
.DEFAULT_GOAL := start
start:
@make install
@make serve
install: test-bundler
@git submodule update --init --recursive
@bundle install
serve: test-jekyll
@jekyll serve
build: test-jekyll
@jekyll build
serve-production: test-jekyll
@JEKYLL_ENV=production jekyll serve
build-production: test-jekyll
@JEKYLL_ENV=production jekyll build
crowdin-sync: test-crowdin
@crowdin-cli upload sources --auto-update -b master
@crowdin-cli download -b master
###
# Misc stuff:
###
BUNDLE_EXISTS := $(shell command -v bundle 2> /dev/null)
JEKYLL_EXISTS := $(shell command -v jekyll 2> /dev/null)
CROWDIN_EXISTS := $(shell command -v crowdin-cli 2> /dev/null)
test-bundler:
ifndef BUNDLE_EXISTS
$(error bundler is not installed. Run `gem install bundler`)
endif
test-jekyll:
ifndef JEKYLL_EXISTS
$(error Jekyll is not installed. Run `make install`)
endif
test-crowdin:
ifndef CROWDIN_EXISTS
$(error Crowdin is not installed. Run `make install`)
endif
ifndef CROWDIN_API_KEY
$(error CROWDIN_API_KEY is undefined)
endif