From: Peter Rabbitson Date: Mon, 20 Jun 2016 17:00:09 +0000 (+0200) Subject: Minor improvements to the maint helper scripts X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8f163090e4e2002e1fbf48db0bb1e3745e0d70d4;p=dbsrgits%2FDBIx-Class-Historic.git Minor improvements to the maint helper scripts --- diff --git a/maint/poisonsmoke.bash b/maint/poisonsmoke.bash index c3c637c..d8b984c 100755 --- a/maint/poisonsmoke.bash +++ b/maint/poisonsmoke.bash @@ -24,11 +24,17 @@ for var in "${toggle_booleans[@]}" do if [[ -z "${!var}" ]] ; then export $var=1 - echo "POISON_ENV: setting $var to 1" + echo -n "$var " fi done +echo -e "\n\n^^ variables above **automatically** set to '1'" provecmd="nice prove -QlrswTj10" -echo -e "\nExecuting \`$provecmd\` via $(which perl)\n" -$provecmd +echo -e " +Executing \`$provecmd $@\` via $(which perl) within the following environment: + +$(env | grep -P 'TEST|HARNESS|MAKE|TRAVIS|PERL|DBIC|PATH|SHELL' | LC_ALL=C sort | cat -v) +" + +$provecmd "$@" diff --git a/maint/travis_buildlog_downloader b/maint/travis_buildlog_downloader index b67ed15..3287d35 100755 --- a/maint/travis_buildlog_downloader +++ b/maint/travis_buildlog_downloader @@ -19,19 +19,19 @@ my $resp = ( my $ua = HTTP::Tiny->new )->get( $base_url ); die "Unable to retrieve $resp->{url}: $resp->{status}\n$resp->{content}\n\n" unless $resp->{success}; -my @job_ids = ( map - { ($_->{id}||'') =~ /^([0-9]+)$/ } +my @jobs = ( map + { ( ($_->{id}||'') =~ /^([0-9]+)$/ ) ? [ $1 => $_->{number} ] : () } @{( eval { decode_json( $resp->{content} )->{matrix} } || [] )} -) or die "Unable to find any job ids:\n$resp->{content}\n\n"; +) or die "Unable to find any jobs:\n$resp->{content}\n\n"; my $dir = "TravisCI_build_$build_id"; mkdir $dir unless -d $dir; -for my $job_id (@job_ids) { - my $log_url = "http://api.travis-ci.org/jobs/$job_id/log.txt"; - my $dest_fn = "$dir/job_$job_id.log"; +for my $job (@jobs) { + my $log_url = "http://api.travis-ci.org/jobs/$job->[0]/log.txt"; + my $dest_fn = "$dir/job_$job->[1].$job->[0].log"; print "Retrieving $log_url into $dest_fn\n";