Skip to content

Commit c693561

Browse files
committed
Merge pull request jquery-archive#3094 from eddiemonge/makefile
Fix license version and zip folder
2 parents 3542c9c + 5f2c402 commit c693561

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ CSSTHEMEFILES = css/themes/${THEME}/jquery.mobile.theme.css
5858
# Helper Variables
5959
# The command to replace the @VERSION in the files with the actual version
6060
VER = sed "s/v@VERSION/$$(git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd")/"
61-
VER_MIN = "/*! jQuery Mobile v${VER_OFFICIAL} jquerymobile.com | jquery.org/license */"
61+
VER_MIN = "/*! jQuery Mobile v$$(git log -1 --format=format:"Git Build: SHA1: %H <> Date: %cd") jquerymobile.com | jquery.org/license */"
6262
VER_OFFICIAL = $(shell cat version.txt)
63+
deploy: VER = sed "s/v@VERSION/${VER_OFFICIAL}/"
64+
deploy: VER_MIN = "/*! jQuery Mobile v${VER_OFFICIAL} jquerymobile.com | jquery.org/license */"
6365

6466
# The output folder for the finished files
6567
OUTPUT = compiled
@@ -86,13 +88,13 @@ all: init css js zip notify
8688
# Build and minify the CSS files
8789
css: init
8890
# Build the CSS file with the theme included
89-
@@cat js/jquery.mobile.intro.js | ${VER} > ${OUTPUT}/${NAME}.css
91+
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.css
9092
@@cat ${CSSTHEMEFILES} ${CSSFILES} >> ${OUTPUT}/${NAME}.css
9193
# ..... and then minify it
9294
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.css
9395
@@java -jar build/yuicompressor-2.4.6.jar --type css ${OUTPUT}/${NAME}.css >> ${OUTPUT}/${NAME}.min.css
9496
# Build the CSS Structure-only file
95-
@@cat js/jquery.mobile.intro.js | ${VER} > ${OUTPUT}/${STRUCTURE}.css
97+
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${STRUCTURE}.css
9698
@@cat ${CSSFILES} >> ${OUTPUT}/${STRUCTURE}.css
9799
# ..... and then minify it
98100
@@echo ${VER_MIN} > ${OUTPUT}/${STRUCTURE}.min.css
@@ -114,7 +116,7 @@ docs: init css js
114116
-exec perl -pi -e \
115117
's|js/"|${NAME}.min.js"|g;s|css/themes/default/|${NAME}.min.css|g;s|js/jquery.js"|jquery.js"|g' {} \;
116118
# ... Move and zip up the the whole folder
117-
@@zip -rq ${OUTPUT}/${NAME}.docs.zip tmp/${NAME}
119+
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.docs.zip ${NAME}
118120
@@mv tmp/${NAME} ${OUTPUT}/demos
119121
# Finish by removing the temporary files
120122
@@rm -rf tmp
@@ -134,7 +136,7 @@ init:
134136
# Build and minify the JS files
135137
js: init
136138
# Build the JavaScript file
137-
@@cat js/jquery.mobile.intro.js | ${VER} > ${OUTPUT}/${NAME}.js
139+
@@cat LICENSE-INFO.txt | ${VER} > ${OUTPUT}/${NAME}.js
138140
@@cat ${JSFILES} >> ${OUTPUT}/${NAME}.js
139141
# ..... and then minify it
140142
@@echo ${VER_MIN} > ${OUTPUT}/${NAME}.min.js
@@ -153,7 +155,7 @@ zip: init css js
153155
# Packaging up the files into a zip archive
154156
@@mkdir tmp
155157
@@cp -r ${OUTPUT} tmp/${NAME}
156-
@@zip -rq ${OUTPUT}/${NAME}.zip tmp/${NAME}/
158+
@@cd tmp; zip -rq ../${OUTPUT}/${NAME}.zip ${NAME}
157159
@@rm -rf tmp
158160
# -------------------------------------------------
159161

0 commit comments

Comments
 (0)