This commit is contained in:
Jon Ruskin 2018-05-16 23:16:48 -07:00
Родитель 03eeeafe5b
Коммит 60870f8273
7 изменённых файлов: 33 добавлений и 5 удалений

Просмотреть файл

@ -4,12 +4,15 @@ require "rake/testtask"
require "rubocop/rake_task"
desc "Run source setup scripts"
task :setup do
task :setup, [:arguments] do |task, args|
arguments = args[:arguments].to_s.split
force = arguments.include?("-f") ? "-f" : ""
Dir["script/source-setup/*"].each do |script|
# green
puts "\033[32mRunning #{script}.\e[0m"
if system(script)
if system(script, force)
# green
puts "\033[32mCompleted #{script}.\e[0m"
elsif $?.exitstatus == 127

Просмотреть файл

@ -2,4 +2,4 @@
set -e
bundle exec rake setup
bundle exec rake setup["$@"]

Просмотреть файл

@ -9,4 +9,9 @@ fi
# setup test fixtures
BASE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd $BASE_PATH/test/fixtures/bower
if [ "$1" == "-f" ]; then
find . -not -regex "\.*" -and -not -name "bower\.json" -print0 | xargs -0 rm -rf
fi
bower install

Просмотреть файл

@ -13,4 +13,8 @@ cd $BASE_PATH/test/fixtures/bundler
# unset any pre-existing gemfile when installing test fixtures
unset BUNDLE_GEMFILE
bundle install --path $BASE_PATH/test/fixtures/bundler/vendor/gems
if [ "$1" == "-f" ]; then
find . -not -regex "\.*" -and -not -name "Gemfile" -print0 | xargs -0 rm -rf
fi
bundle install --path vendor/gems

Просмотреть файл

@ -9,4 +9,9 @@ fi
# setup test fixtures
BASE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd $BASE_PATH/test/fixtures/haskell
if [ "$1" == "-f" ]; then
find . -not -regex "\.*" -and -not -name "app\.cabal" -print0 | xargs -0 rm -rf
fi
cabal new-build

Просмотреть файл

@ -9,5 +9,11 @@ fi
# setup test fixtures
BASE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
export GOPATH="$BASE_PATH/test/fixtures/go"
cd $BASE_PATH/test/fixtures/go/src/test
cd $BASE_PATH/test/fixtures/go
if [ "$1" == "-f" ]; then
find . -not -regex "\.*" -and -not -path "*/src/test*" -and -not -path "*/src" -print0 | xargs -0 rm -rf
fi
cd src/test
go get

Просмотреть файл

@ -9,4 +9,9 @@ fi
# setup test fixtures
BASE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd $BASE_PATH/test/fixtures/npm
if [ "$1" == "-f" ]; then
find . -not -regex "\.*" -and -not -name "package\.json" -print0 | xargs -0 rm -rf
fi
npm install