Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion script/build-source-gem
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,34 @@ if [ ! -d "coffeescript/" ]; then
fi
pushd coffeescript/

if [ "$VERSION" == "" ]
then
git fetch --tags
VERSION=$(git describe --tags)
git checkout "$VERSION"
echo "Version is empty. Using latest tag: $VERSION."
fi

git checkout "$VERSION"

npm install

mkdir -p lib/coffee_script

MINIFY=false ./bin/cake build:browser
mv docs/v1/browser-compiler/coffee-script.js lib/coffee_script/coffee-script.js

case "$VERSION" in
1.*)
mv docs/v1/browser-compiler/coffee-script.js lib/coffee_script/coffee-script.js
;;
2.*)
mv docs/v2/browser-compiler/coffeescript.js lib/coffee_script/coffee-script.js
;;
*)
echo "NO VALID VERSION DETECTED. FAILING HARD."
exit 1
;;
esac

cat << ERUBY > lib/coffee_script/source.rb
module CoffeeScript
Expand Down