-
Notifications
You must be signed in to change notification settings - Fork 547
/
Makefile
33 lines (28 loc) · 899 Bytes
/
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
SITE_REPO = [email protected]:flightjs/flightjs.github.io.git
BUILD_DIR := build
SITE_MASTER = $(BUILD_DIR)/site
VERSION = `node -pe "require('./package.json').version"`
clean:
@ rm -rf $(BUILD_DIR)
setup:
@ npm install
standalone: setup clean
@ mkdir -p $(BUILD_DIR)
@ npm run build
test: standalone
@ npm test
# clones the Flight project page into the 'build' directory
# creates new directory for latest version
# copies flight.js and flight.min.js
# commits and pushes
release: standalone
git clone $(SITE_REPO) $(SITE_MASTER)
@ rm -rf $(SITE_MASTER)/release/latest
@ mkdir -p $(SITE_MASTER)/release/latest
@ mkdir $(SITE_MASTER)/release/$(VERSION)
@ cp $(BUILD_DIR)/*.js $(SITE_MASTER)/release/latest
@ cp $(BUILD_DIR)/*.js $(SITE_MASTER)/release/$(VERSION)
@ cd $(SITE_MASTER); \
git add release; \
git commit -m "Add latest release of Flight"; \
git push origin master