forked from mkristian/dm-ldap-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-all.sh
executable file
·52 lines (47 loc) · 1.37 KB
/
run-all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
run_bundler() {
ruby=$1
shift
for version in $@ ; do
echo
echo "-----------------------------------"
echo "run specs with $ruby"
echo "datamapper base version $version"
echo "ldap facade $FACADE"
echo "-----------------------------------"
rm -f Gemfile.lock
ln -s Gemfile.lock.$version Gemfile.lock
($ruby -S bundle exec rspec spec)
done
}
run_maven(){
jruby_versions=$1
shift
for version in $@ ; do
echo
echo "-----------------------------------"
echo "run specs with ruby-maven"
echo "jruby version $jruby_versions"
echo "datamapper base version $version"
echo "-----------------------------------"
rm -f Gemfile.lock
rm -f Gemfile.pom
ln -s Gemfile.lock.$version Gemfile.lock
rm -rf target/rubygems
rmvn spec spec -- -Djruby.18and19 -Djruby.versions=$jruby_versions
done
}
# iterate over all supported jruby versions
VERSIONS='1.0.0 1.1.0'
run_maven 1.5.6,1.6.2 $VERSIONS || exit -1
# take only the latest (j)ruby version (on ubuntu naming convnetion)
run_bundler 'jruby --1.8' $VERSIONS || exit -1
#TODO run_bundler 'jruby --1.9' $VERSIONS || exit -1
for f in net_ldap ruby_ldap ; do
export FACADE=$f
run_bundler 'ruby1.8' $VERSIONS || exit -1
run_bundler 'ruby1.9.1' $VERSIONS || exit -1
done
rmvn package -- -DskipSpecs
cp target/dm-ldap-adapter/dm-ldap-adapter-*-java.gem .
gem build dm-ldap-adapter.gemspec