forked from jquery-archive/jquery-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (49 loc) · 1.81 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# in build/bin/config.sh this setting will alter the variable definitions to match
# the changes for the deploy target in the makefile. temp solution
ARGS = IS_DEPLOY_TARGET=false
deploy: ARGS = IS_DEPLOY_TARGET=true
# The output folder for the finished files
OUTPUT = compiled
# Build Targets
# When no build target is specified, all gets ran
all: css js zip notify
clean: init
@@node node_modules/.bin/grunt clean
# Create the output directory.
# NOTE it doesn't appear as though you can override init from a task file
init:
@@if ! (node -v | grep "\(v0.[6-9]\|v[1-9].[0-9]\)" > /dev/null); then echo "!!! node.js > 0.6.x required" && exit 1; fi
@@npm install
@@node node_modules/.bin/grunt custom_init
# Build and minify the CSS files
css: init
@@node node_modules/.bin/grunt css
# Build and minify the JS files
js: init
@@node node_modules/.bin/grunt js
# -------------------------------------------------
#
# For jQuery Team Use Only
#
# -------------------------------------------------
docs: init js css
@@${ARGS} bash build/bin/docs.sh
# Output a message saying the process is complete
notify: init
@@echo "The files have been built and are in: " $$(pwd)/${OUTPUT}
# Zip up the jQm files without docs
zip: init css js
@@${ARGS} bash build/bin/zip.sh
build_latest: css docs js zip
@@${ARGS} bash build/bin/build_latest.sh
# Push the latest git version to the CDN. This is done on a post commit hook
deploy_latest:
@@${ARGS} bash build/bin/deploy_latest.sh
# TODO target name preserved to avoid issues during refactor, latest -> deploy_latest
latest: build_latest deploy_latest
# Push the nightly backups. This is done on a server cronjob
deploy_nightlies:
@@${ARGS} bash build/bin/deploy_nightlies.sh
# Deploy a finished release. This is manually done.
deploy: clean init css js docs zip
@@${ARGS} bash build/bin/deploy.sh