Skip to content
This repository
Browse code

Generate compressed versions

  • Loading branch information...
commit c58a71c4c18250128a111221c1a82087298d796d 1 parent fbfe438
Eero Anttila eeroan authored

Showing 2 changed files with 16 additions and 5 deletions. Show diff stats Hide diff stats

  1. +16 5 build.sh
  2. BIN  yuicompressor-2.4.6.jar
21 build.sh
... ... @@ -1,25 +1,36 @@
1 1 #!/bin/bash
  2 +BUILD_PREFIX=build/jquery.continuous-calendar
  3 +LATEST_JS=$BUILD_PREFIX-latest.js
  4 +LATEST_JS_MIN=$BUILD_PREFIX-latest-min.js
  5 +LATEST_CSS=$BUILD_PREFIX-latest.css
  6 +LATEST_CSS_MIN=$BUILD_PREFIX-latest-min.css
2 7 current_dir=$(pwd)
3 8 cd $(dirname $0)
4 9 echo Build nightly...
5 10 old_version=$(git tag | tail -n1)
6 11 version=$1
7 12 rm build/*latest*
8   -find src/main -name *.js |xargs cat >build/jquery.continuous-calendar-latest.js
9   -cp src/main/jquery.continuous-calendar.css build/jquery.continuous-calendar-latest.css
  13 +find src/main -name *.js |xargs cat >$LATEST_JS
  14 +echo "Compressing js..."
  15 +java -jar yuicompressor-2.4.6.jar --type js $LATEST_JS -o $LATEST_JS_MIN
  16 +cp src/main/jquery.continuous-calendar.css $LATEST_CSS
  17 +echo "Compressing css..."
  18 +java -jar yuicompressor-2.4.6.jar --type css $LATEST_CSS -o $LATEST_CSS_MIN
10 19 if [ "$version" = "" ]
11 20 then
12 21 echo "Version information not found. Type ./build.sh <version>"
13 22 echo "Previous version was $old_version"
14 23 else
15   - if [ -f build/jquery.continuous-calendar-$version.js ]
  24 + if [ -f $BUILD_PREFIX-$version.js ]
16 25 then
17 26 echo "Version $version exists, no new versions. Create by typing ./build.sh <version>"
18 27 echo "Previous version was $old_version"
19 28 else
20 29 echo "Creating version $version"
21   - cp build/jquery.continuous-calendar-latest.js build/jquery.continuous-calendar-$version.js
22   - cp build/jquery.continuous-calendar-latest.css build/jquery.continuous-calendar-$version.css
  30 + cp $LATEST_JS $BUILD_PREFIX-$version.js
  31 + cp $LATEST_CSS $BUILD_PREFIX-$version.css
  32 + cp $LATEST_JS_MIN $BUILD_PREFIX-$version-min.js
  33 + cp $LATEST_CSS_MIN $BUILD_PREFIX-$version-min.css
23 34 git add build
24 35 git commit -m "Buld for version $version"
25 36 git tag $version
BIN  yuicompressor-2.4.6.jar
Binary file not shown

0 comments on commit c58a71c

Please sign in to comment.
Something went wrong with that request. Please try again.