rm -rf /home/opensrf/Evergreen /home/opensrf/OpenSRF
su - opensrf sh -c "$OSRF_COMMAND";
+# Show tips
+
+cd /home/opensrf/OpenSRF/
+echo 'Tip of OpenSRF:' `git log --format=oneline | head -1`
+cd /home/opensrf/Evergreen/
+echo 'Tip of Evergreen:' `git log --format=oneline | head -1`
+
# Install pre-reqs
mkdir -p /usr/src/evergreen;
cd /usr/src/evergreen;
my $state = 'skipping';
my $error_count = 0;
my $subpage_count = 0;
+my $opensrf_tip = '';
+my $evergreen_tip = '';
open MAIN_PAGE, ">test.html";
print MAIN_PAGE html_header('Test Output Summary');
open PASS_FAIL, ">pass_fail.txt";
while (my $line = <>) {
+ if ($line =~ /Tip of OpenSRF: (.*)/) {
+ $opensrf_tip = $1;
+ }
+ if ($line =~ /Tip of Evergreen: (.*)/) {
+ $evergreen_tip = $1;
+ }
if ($line =~ /_\.-~= (.*)$/) {
$state = 'outputting';
print_pass_or_fail();
}
}
print_pass_or_fail();
-print MAIN_PAGE html_footer();
+print MAIN_PAGE "</ul>\n" . branch_tips() . "\n" . html_footer();
close MAIN_PAGE;
close PASS_FAIL;
update_rss();
}
}
+sub branch_tips {
+ my $html = "<h2>Current OpenSRF tip:</h2>\n<pre>$opensrf_tip</pre>\n";
+ $html .= "<h2>Current Evergreen tip:</h2>\n<pre>$evergreen_tip</pre>\n";
+ `touch prev_tips.txt`;
+ my $prev = `cat prev_tips.txt`;
+ $prev =~ s/<h2>Current /<h2> Previous /g;
+ open TIP_FILE, "> prev_tips.txt";
+ print TIP_FILE $html;
+ close TIP_FILE;
+ $html .= $prev;
+ return $html;
+}
+
sub update_rss {
`touch pass_fail.txt.prev`;
if (`diff pass_fail.txt pass_fail.txt.prev`) {