Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Generate compressed versions

  • Loading branch information...
commit c58a71c4c18250128a111221c1a82087298d796d 1 parent fbfe438
Eero Anttila eeroan authored
Showing with 16 additions and 5 deletions.
  1. +16 −5 build.sh
  2. BIN  yuicompressor-2.4.6.jar
21 build.sh
View
@@ -1,25 +1,36 @@
#!/bin/bash
+BUILD_PREFIX=build/jquery.continuous-calendar
+LATEST_JS=$BUILD_PREFIX-latest.js
+LATEST_JS_MIN=$BUILD_PREFIX-latest-min.js
+LATEST_CSS=$BUILD_PREFIX-latest.css
+LATEST_CSS_MIN=$BUILD_PREFIX-latest-min.css
current_dir=$(pwd)
cd $(dirname $0)
echo Build nightly...
old_version=$(git tag | tail -n1)
version=$1
rm build/*latest*
-find src/main -name *.js |xargs cat >build/jquery.continuous-calendar-latest.js
-cp src/main/jquery.continuous-calendar.css build/jquery.continuous-calendar-latest.css
+find src/main -name *.js |xargs cat >$LATEST_JS
+echo "Compressing js..."
+java -jar yuicompressor-2.4.6.jar --type js $LATEST_JS -o $LATEST_JS_MIN
+cp src/main/jquery.continuous-calendar.css $LATEST_CSS
+echo "Compressing css..."
+java -jar yuicompressor-2.4.6.jar --type css $LATEST_CSS -o $LATEST_CSS_MIN
if [ "$version" = "" ]
then
echo "Version information not found. Type ./build.sh <version>"
echo "Previous version was $old_version"
else
- if [ -f build/jquery.continuous-calendar-$version.js ]
+ if [ -f $BUILD_PREFIX-$version.js ]
then
echo "Version $version exists, no new versions. Create by typing ./build.sh <version>"
echo "Previous version was $old_version"
else
echo "Creating version $version"
- cp build/jquery.continuous-calendar-latest.js build/jquery.continuous-calendar-$version.js
- cp build/jquery.continuous-calendar-latest.css build/jquery.continuous-calendar-$version.css
+ cp $LATEST_JS $BUILD_PREFIX-$version.js
+ cp $LATEST_CSS $BUILD_PREFIX-$version.css
+ cp $LATEST_JS_MIN $BUILD_PREFIX-$version-min.js
+ cp $LATEST_CSS_MIN $BUILD_PREFIX-$version-min.css
git add build
git commit -m "Buld for version $version"
git tag $version
BIN  yuicompressor-2.4.6.jar
View
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.