-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (31 loc) · 920 Bytes
/
Makefile
File metadata and controls
40 lines (31 loc) · 920 Bytes
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
BASE_URL ?= "/"
VERSION ?= ""
SHELL = /bin/bash
default: install
h help:
@egrep '^\S|^$$' Makefile
install:
pnpm install
bundle config set --local path vendor/bundle
bundle install
s serve:
bundle exec jekyll serve --trace --livereload
define baseurlparam =
$(if $(BASE_URL),-- --baseurl $(BASE_URL),-- --baseurl "")
endef
build: version
npm run build $(baseurlparam)
debug: version
npm run debug
version:
touch _config.version.yml
if [[ $(VERSION) == "" ]]; then \
(cd .. && make version); \
ver=$$(head -n 1 ../.version 2> /dev/null || echo unknown); \
echo "version: $$ver" > _config.version.yml; \
echo "$$ver" > .version; \
else \
echo "version: $(VERSION)" > _config.version.yml; \
echo "$(VERSION)" > .version; \
fi
echo "{ \"schemaVersion\": 1, \"label\": \"version\", \"message\": \"$$(head -n 1 .version 2> /dev/null || echo unknown)\", \"color\": \"orange\" }" > version.json