Skip to content
Permalink
Browse files
New version
  • Loading branch information
jcubic committed Dec 8, 2016
1 parent aa6496a commit 27f74eed26999001bb5c94fb43863bf4a1d1e36b
@@ -8,3 +8,4 @@ examples
bin
css/jquery.filebrowser-*.css
js/jquery.filebrowser-*.js
version
@@ -1,4 +1,4 @@
VERSION=0.1.0
VERSION=0.2.0
COMPRESS=uglifyjs
SED=sed
CP=cp
@@ -0,0 +1,47 @@
VERSION={{VERSION}}
COMPRESS=uglifyjs
SED=sed
CP=cp
RM=rm
CAT=cat
DATE=`date -uR`


ALL: Makefile .$(VERSION) js/jquery.filebrowser-$(VERSION).js js/jquery.filebrowser.js js/jquery.filebrowser-$(VERSION).min.js js/jquery.filebrowser.min.js css/jquery.filebrowser-$(VERSION).css css/jquery.filebrowser-$(VERSION).min.css css/jquery.filebrowser.min.css css/jquery.filebrowser.css README.md bower.json package.json

.$(VERSION): Makefile
touch .$(VERSION)

bower.json: bower.in .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" bower.in > bower.json

package.json: package.in .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" package.in > package.json

js/jquery.filebrowser-$(VERSION).js: js/jquery.filebrowser-src.js .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s/{{DATE}}/$(DATE)/g" js/jquery.filebrowser-src.js > js/jquery.filebrowser-$(VERSION).js

js/jquery.filebrowser.js: js/jquery.filebrowser-$(VERSION).js
$(CP) js/jquery.filebrowser-$(VERSION).js js/jquery.filebrowser.js

js/jquery.filebrowser-$(VERSION).min.js: js/jquery.filebrowser-$(VERSION).js
$(COMPRESS) -o js/jquery.filebrowser-$(VERSION).min.js --comments --mangle -- js/jquery.filebrowser-$(VERSION).js

js/jquery.filebrowser.min.js: js/jquery.filebrowser-$(VERSION).min.js
$(CP) js/jquery.filebrowser-$(VERSION).min.js js/jquery.filebrowser.min.js

css/jquery.filebrowser-$(VERSION).css: css/jquery.filebrowser-src.css .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" -e "s/{{DATE}}/$(DATE)/g" css/jquery.filebrowser-src.css > css/jquery.filebrowser-$(VERSION).css

css/jquery.filebrowser.css: css/jquery.filebrowser-$(VERSION).css .$(VERSION)
$(CP) css/jquery.filebrowser-$(VERSION).css css/jquery.filebrowser.css

css/jquery.filebrowser.min.css: css/jquery.filebrowser-$(VERSION).min.css
$(CP) css/jquery.filebrowser-$(VERSION).min.css css/jquery.filebrowser.min.css

css/jquery.filebrowser-$(VERSION).min.css: css/jquery.filebrowser-$(VERSION).css
java -jar bin/yuicompressor-2.4.8.jar css/jquery.filebrowser-$(VERSION).css -o css/jquery.filebrowser-$(VERSION).min.css
$(SED) -i -e 's/0,100%/0%,100%/g' css/jquery.filebrowser-$(VERSION).min.css

README.md: README.in .$(VERSION)
$(SED) -e "s/{{VER}}/$(VERSION)/g" < README.in > README.md
@@ -12,11 +12,13 @@
"README.in",
"bower.in",
"Makefile",
"Makefile.in",
".gitignore",
".npmignore",
"package.in",
"package.json",
"bin"
"bin",
"version"

],
"dependencies": {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 version
@@ -0,0 +1,10 @@
#!/bin/bash

VERSION=`grep VERSION= Makefile | sed -e 's/VERSION=\(.*\)/\1/'`
if [ $1 != $VERSION ]; then
sed -e "s/{{VERSION}}/"$1"/" Makefile.in > Makefile
git mv css/jquery.filebrowser-${VERSION}.css css/jquery.filebrowser-${1}.css
git mv css/jquery.filebrowser-${VERSION}.min.css css/jquery.filebrowser-${1}.min.css
git mv js/jquery.filebrowser-${VERSION}.js js/jquery.filebrowser-${1}.js
git mv js/jquery.filebrowser-${VERSION}.min.js js/jquery.filebrowser-${1}.min.js
fi

0 comments on commit 27f74ee

Please sign in to comment.