Skip to content
This repository
Newer
Older
100755 185 lines (152 sloc) 7.961 kb
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
1 # The system generated date in YYYYMMDD format
2 DATE = $(shell date "+%Y%m%d")
ac620525 » jeresig
2010-10-14 Add a way to build copies of jQuery Mobile.
3
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
4 # The version according to the source file. If this is the nightly build, use a different version
ac620525 » jeresig
2010-10-14 Add a way to build copies of jQuery Mobile.
5 VER = $(shell cat version.txt)
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
6 nightly: VER = nightly
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
7
8 # The command to replace the @VERSION in the files with the actual version
c9a34f1d » jeresig
2010-11-11 Add versioning information to the headers of the CSS and JS files.
9 SED_VER = sed "s/@VERSION/${VER}/"
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
10 nightly: SED_VER = sed "s/@VERSION/Nightly-${DATE}/"
ac620525 » jeresig
2010-10-14 Add a way to build copies of jQuery Mobile.
11
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
12 # The version of jQuery core used
13 JQUERY = 1.5.2
14
15 # The directory to create the zipped files in and also serves as the filenames
0e76a6c2 » jeresig
2010-10-15 Add a way to generate a single zip file of a release.
16 DIR = jquery.mobile-${VER}
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
17
18 # The output folder for the finished files
19 OUTPUT = compiled
20
21 # The filenames
22 JS = ${DIR}.js
0e76a6c2 » jeresig
2010-10-15 Add a way to generate a single zip file of a release.
23 MIN = ${DIR}.min.js
24 CSS = ${DIR}.css
25 CSSMIN = ${DIR}.min.css
ac620525 » jeresig
2010-10-14 Add a way to build copies of jQuery Mobile.
26
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
27 # The files to include when compiling the JS files
28 JSFILES = js/jquery.ui.widget.js \
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
29 js/jquery.mobile.widget.js \
30 js/jquery.mobile.media.js \
31 js/jquery.mobile.support.js \
32 js/jquery.mobile.vmouse.js \
33 js/jquery.mobile.event.js \
34 js/jquery.mobile.hashchange.js \
35 js/jquery.mobile.page.js \
36 js/jquery.mobile.core.js \
37 js/jquery.mobile.navigation.js \
38 js/jquery.mobile.fixHeaderFooter.js \
39 js/jquery.mobile.forms.checkboxradio.js \
40 js/jquery.mobile.forms.textinput.js \
41 js/jquery.mobile.forms.select.js \
42 js/jquery.mobile.buttonMarkup.js \
43 js/jquery.mobile.forms.button.js \
44 js/jquery.mobile.forms.slider.js \
45 js/jquery.mobile.collapsible.js \
46 js/jquery.mobile.controlGroup.js \
47 js/jquery.mobile.fieldContain.js \
48 js/jquery.mobile.listview.js \
49 js/jquery.mobile.listview.filter.js \
50 js/jquery.mobile.dialog.js \
51 js/jquery.mobile.navbar.js \
52 js/jquery.mobile.grid.js \
53 js/jquery.mobile.init.js
54
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
55 # The files to include when compiling the CSS files
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
56 CSSFILES = themes/default/jquery.mobile.theme.css \
57 themes/default/jquery.mobile.core.css \
58 themes/default/jquery.mobile.transitions.css \
59 themes/default/jquery.mobile.grids.css \
60 themes/default/jquery.mobile.headerfooter.css \
61 themes/default/jquery.mobile.navbar.css \
62 themes/default/jquery.mobile.button.css \
63 themes/default/jquery.mobile.collapsible.css \
64 themes/default/jquery.mobile.controlgroup.css \
65 themes/default/jquery.mobile.dialog.css \
66 themes/default/jquery.mobile.forms.checkboxradio.css \
67 themes/default/jquery.mobile.forms.fieldcontain.css \
68 themes/default/jquery.mobile.forms.select.css \
69 themes/default/jquery.mobile.forms.textinput.css \
70 themes/default/jquery.mobile.listview.css \
71 themes/default/jquery.mobile.forms.slider.css
72
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
73 # By default, this is what get runs when make is called without any arguments.
74 # Min and un-min CSS and JS files are the only things built
75 all: init js min css cssmin notify
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
76
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
77 # Build the normal CSS file.
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
78 css: init
79 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSS}
80 @@cat ${CSSFILES} >> ${OUTPUT}/${CSS}
81
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
82 # Build the minified CSS file
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
83 cssmin: init css
84 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${CSSMIN}
85 @@java -jar build/yuicompressor-2.4.4.jar --type css ${OUTPUT}/${CSS} >> ${OUTPUT}/${CSSMIN}
86
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
87 # Build the normal JS file
88 js: init
89 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${JS}
90 @@cat ${JSFILES} >> ${OUTPUT}/${JS}
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
91
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
92 # Build the minified JS file
93 min: init js
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
94 @@head -8 js/jquery.mobile.core.js | ${SED_VER} > ${OUTPUT}/${MIN}
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
95 @@java -jar build/google-compiler-20100917.jar --js ${OUTPUT}/${JS} --warning_level QUIET --js_output_file ${MIN}.tmp
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
96 @@cat ${MIN}.tmp >> ${OUTPUT}/${MIN}
97 @@rm -f ${MIN}.tmp
98
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
99 # Let the user know the files were built and where they are
100 notify:
101 @@echo "The files have been built and are in " $$(pwd)/${OUTPUT}
102
103 # Create the output directory. This is in a separate step so its not dependant on other targets
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
104 init:
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
105 @@rm -rf ${OUTPUT}
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
106 @@mkdir ${OUTPUT}
107
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
108 # Pull the latest commits. This is used for the nightly build but can be used to save some keystrokes
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
109 pull:
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
110 @@git pull --quiet upstream master
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
111
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
112 # Zip the 4 files and the theme images into one convenient package
113 zip: init js min css cssmin
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
114 @@rm -rf ${DIR}
47a45f5c » jeresig
2010-10-15 Add deploy functionality to the build script.
115 @@mkdir -p ${DIR}
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
116 @@cp ${OUTPUT}/${DIR}*.js ${DIR}/
117 @@cp ${OUTPUT}/${DIR}*.css ${DIR}/
47a45f5c » jeresig
2010-10-15 Add deploy functionality to the build script.
118 @@cp -R themes/default/images ${DIR}/
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
119 @@zip -rq ${OUTPUT}/${DIR}.zip ${DIR}
88221323 » eddiemonge
2011-04-07 Feature Request for issue 1177: Make Makefile output cleaner stuff
120 @@rm -fr ${DIR}
47a45f5c » jeresig
2010-10-15 Add deploy functionality to the build script.
121
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
122
123 # Used by the jQuery team to make the nightly builds
124 nightly: pull zip
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
125 # Create a log that lists the current version according to the code and the git information for the last commit
126 @@echo $$"\nGit Release Version: " >> ${OUTPUT}/log.txt
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
127 @@cat version.txt >> ${OUTPUT}/log.txt
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
128 @@echo $$"\nGit Information for this build:" >> ${OUTPUT}/log.txt
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
129 @@git log -1 --format=format:"SHA1: %H %nDate: %cd %nTitle: %s" >> ${OUTPUT}/log.txt
130
131 # Create the folder to hold the files for the demos
132 @@mkdir -p ${VER}
133
134 # Copy in the base stuff for the demos
135 @@cp -r index.html themes experiments docs ${VER}/
136
137 # First change all the paths from super deep to the same level for JS files
138 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../../../js|src="js|g' {} \;
139 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../../js|src="js|g' {} \;
140 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="../js|src="js|g' {} \;
141
142 # Then change all the paths from super deep to the same level for CSS files
143 @@find ${VER} -type f -name '*.html' -exec sed -i 's|media="only all"||g' {} \;
144 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../../../|rel="stylesheet" href="|g' {} \;
145 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../../|rel="stylesheet" href="|g' {} \;
146 @@find ${VER} -type f -name '*.html' -exec sed -i 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \;
147
148 # Change the empty paths to the location of this nightly file
149 @@find ${VER} -type f -name '*.html' -exec sed -i 's|href="themes/default/"|href="http://jquerymobile.com/nightlies/${DATE}/${DIR}.min.css"|g' {} \;
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
150 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \;
38b8ee59 » eddiemonge
2011-04-11 Changed Makefile to include nightly build script and other misc fixes
151 @@find ${VER} -type f -name '*.html' -exec sed -i 's|src="js/"|src="http://jquerymobile.com/nightlies/${DATE}/${DIR}.min.js"|g' {} \;
152
153 # Move the demos into the output folder
154 @@mv ${VER} ${OUTPUT}/demos
155
156 # Move the output folder to the nightlies folder
157 @@mv ${OUTPUT} ../htdocs/nightlies/${DATE}
158
159
47a45f5c » jeresig
2010-10-15 Add deploy functionality to the build script.
160 # Used by the jQuery team to deploy a build to the CDN
161 deploy: zip
7e115d60 » jeresig
2010-10-15 Add in ability to push demos to the jQueryMobile.com server.
162 # Deploy to CDN
f9ec1e46 » jeresig
2010-10-15 Fix mistake in Makefile deploy script.
163 @@mv ${DIR} ${VER}
164 @@cp ${DIR}.zip ${VER}/
165 @@scp -r ${VER} jqadmin@code.origin.jquery.com:/var/www/html/code.jquery.com/mobile/
166 @@mv ${VER} ${DIR}
7e115d60 » jeresig
2010-10-15 Add in ability to push demos to the jQueryMobile.com server.
167
168 # Deploy Demos
169 @@mkdir -p ${VER}
170 @@cp -r index.html themes experiments docs ${VER}/
e2fa299c » jeresig
2010-10-15 Adjust sub-directory URLs before deploying the demos.
171
ac519ba7 » jeresig
2011-02-04 Simplifying the build script some more.
172 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../../js|src="js|g' {} \;
173 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../../js|src="js|g' {} \;
174 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="../js|src="js|g' {} \;
e2fa299c » jeresig
2010-10-15 Adjust sub-directory URLs before deploying the demos.
175
950784e7 » jeresig
2011-02-03 Make some tweaks to the deploy script.
176 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|media="only all"||g' {} \;
e2fa299c » jeresig
2010-10-15 Adjust sub-directory URLs before deploying the demos.
177 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../../../|rel="stylesheet" href="|g' {} \;
178 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../../|rel="stylesheet" href="|g' {} \;
179 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|rel="stylesheet" href="../|rel="stylesheet" href="|g' {} \;
180
38f09ee6 » jblas
2011-01-05 Sweep through all files to add a trailing slash to <link> tags that i…
181 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|href="themes/default/"|href="http://code.jquery.com/mobile/${VER}/${DIR}.min.css"|g' {} \;
96c1647e » eddiemonge
2011-04-11 Changes so make can be run with just make nightly for the nightly builds
182 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/jquery.js"|src="http://code.jquery.com/jquery-${JQUERY}.min.js"|' {} \;
950784e7 » jeresig
2011-02-03 Make some tweaks to the deploy script.
183 @@find ${VER} -type f -name '*.html' -exec sed -i "" -e 's|src="js/"|src="http://code.jquery.com/mobile/${VER}/${DIR}.min.js"|g' {} \;
e2fa299c » jeresig
2010-10-15 Adjust sub-directory URLs before deploying the demos.
184
7e115d60 » jeresig
2010-10-15 Add in ability to push demos to the jQueryMobile.com server.
185 @@scp -r ${VER} jqadmin@jquerymobile.com:/srv/jquerymobile.com/htdocs/demos/
Something went wrong with that request. Please try again.