Make sure plain install with DBICTEST_VIA_REPLICATED works
[dbsrgits/DBIx-Class.git] / maint / travis-ci_scripts / 50_after_success.bash
CommitLineData
b58ecb01 1#!/bin/bash
2
afeb40d2 3# this file is executed in a subshell - set up the common stuff
4source maint/travis-ci_scripts/common.bash
5
01fd95b6 6if [[ -n "$SHORT_CIRCUIT_SMOKE" ]] || [[ "$TRAVIS_PULL_REQUEST" != "false" ]] ; then exit 0 ; fi
b58ecb01 7
bf44bdb9 8# this part needs to run in parallel unconditionally
9export VCPU_USE="$VCPU_AVAILABLE"
10
11
12if [[ "$DEVREL_DEPS" == "true" ]] && perl -M5.008003 -e1 &>/dev/null ; then
13 parallel_installdeps_notest $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir)
14
15 run_or_err "Attempt to build a dist" "rm -rf inc/ && perl Makefile.PL --skip-author-deps && make dist"
16 tarball_assembled=1
17
18elif [[ "$CLEANTEST" != "true" ]] ; then
afb8fc52 19 parallel_installdeps_notest $(perl -Ilib -MDBIx::Class::Optional::Dependencies=-list_missing,dist_dir)
bf44bdb9 20
21 run_or_err "Attempt to build a dist from original checkout" "make dist"
22 tarball_assembled=1
23fi
24
25
26if [[ -n "$tarball_assembled" ]] ; then
27
7343c211 28 echo "Contents of the resulting dist tarball:"
29 echo "==========================================="
6a0cbc58 30 tar -vzxf DBIx-Class-*.tar.gz
7343c211 31 echo "==========================================="
bf44bdb9 32
33 # kill as much as possible with fire
34 purge_sitelib
35
36 # make sure we are retrying with newest CPAN possible
37 #
38 # not running tests on CPAN.pm - they are not terribly slow,
39 # but https://rt.cpan.org/Ticket/Display.html?id=96437 sucks
40 parallel_installdeps_notest CPAN
41 run_or_err "Make sure CPAN was upgraded to at least 2.10" "perl -M'CPAN 2.010' -e1"
42
43 run_or_err "Re-Configuring CPAN.pm" "perl -MCPAN -e '\
44 CPAN::Config->load;
45
46 # For the time being smoking with this setting is not realistic
47 # https://rt.cpan.org/Ticket/Display.html?id=103280
48 # https://rt.cpan.org/Ticket/Display.html?id=37641
49 # https://rt.cpan.org/Ticket/Display.html?id=77708
50 # https://rt.cpan.org/Ticket/Display.html?id=87474
51 #\$CPAN::Config->{build_requires_install_policy} = q{no};
52
53 \$CPAN::Config->{recommends_policy} = q{yes};
54 CPAN::Config->commit;
55 '"
56
57 cd "$(find DBIx-Class-* -maxdepth 0 -type d | head -n 1)"
58
59 if [[ "$DEVREL_DEPS" == "true" ]] ; then
60
61 for e in $( env | grep 'DBICTEST.*DSN' | cut -f 1 -d '=' ) ; do
62 echo "Unsetting $e"
63 export $e=""
64 done
65
66 run_or_err \
67 "Attempt to configure/test/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \
68 "cpan ."
69
70 else
71 run_or_err \
72 "Attempt to configure/build/install dist using latest CPAN@$(perl -MCPAN -e 'print CPAN->VERSION')" \
73 "perl -MCPAN -e 'notest( install => q{.} )'"
74 fi
344f1f52 75fi