2014-12-28 11:30:36 -07:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
echo "Downloading latest Atom release..."
|
|
|
|
curl -s -L "https://atom.io/download/mac" \
|
2015-02-08 19:10:46 -07:00
|
|
|
-H 'Accept: application/octet-stream' \
|
|
|
|
-o atom.zip
|
2014-12-28 11:30:36 -07:00
|
|
|
|
|
|
|
mkdir atom
|
|
|
|
unzip -q atom.zip -d atom
|
2015-02-08 19:10:46 -07:00
|
|
|
export PATH=$PWD/atom/Atom.app/Contents/Resources/app/apm/bin:$PATH
|
2014-12-28 11:30:36 -07:00
|
|
|
|
|
|
|
echo "Using Atom version:"
|
|
|
|
ATOM_PATH=./atom ./atom/Atom.app/Contents/Resources/app/atom.sh -v
|
|
|
|
|
|
|
|
echo "Downloading package dependencies..."
|
2015-02-08 19:10:46 -07:00
|
|
|
atom/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm clean
|
|
|
|
atom/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm install
|
|
|
|
|
|
|
|
TEST_PACKAGES="${APM_TEST_PACKAGES:=none}"
|
|
|
|
|
|
|
|
if [ "$TEST_PACKAGES" != "none" ]; then
|
|
|
|
echo "Installing atom package dependencies..."
|
|
|
|
for pack in $TEST_PACKAGES ; do
|
|
|
|
atom/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm install $pack
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f ./node_modules/.bin/coffeelint ]; then
|
|
|
|
if [ -d ./lib ]; then
|
|
|
|
echo "Linting package..."
|
|
|
|
./node_modules/.bin/coffeelint lib
|
|
|
|
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
|
|
|
|
fi
|
|
|
|
if [ -d ./spec ]; then
|
|
|
|
echo "Linting package specs..."
|
|
|
|
./node_modules/.bin/coffeelint spec
|
|
|
|
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
|
|
|
|
fi
|
|
|
|
fi
|
2014-12-28 11:30:36 -07:00
|
|
|
|
|
|
|
echo "Running specs..."
|
|
|
|
ATOM_PATH=./atom atom/Atom.app/Contents/Resources/app/apm/node_modules/.bin/apm test --path atom/Atom.app/Contents/Resources/app/atom.sh
|
|
|
|
|
|
|
|
exit
|