summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2015-08-19 13:04:36 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-08-21 06:44:31 -0500
commitb4cdc64a9ea9ee352ddce5933c859b6a6e149acc (patch)
tree385ef2cf9861a81f4503d3545245fe692d1c4c71 /src
parent175fcb8c8640d133824a82da18af8af14d6bc789 (diff)
downloadtalos-hostboot-b4cdc64a9ea9ee352ddce5933c859b6a6e149acc.tar.gz
talos-hostboot-b4cdc64a9ea9ee352ddce5933c859b6a6e149acc.zip
Fixes to git-ci-tool and add more debug info
Change-Id: If4ac6e0c1b03d97a6dddb88196d3d7738fcdbd8b Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/19938 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Brian Silver <bsilver@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/build/tools/hbRelease33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/build/tools/hbRelease b/src/build/tools/hbRelease
index 27e766581..bda4e33af 100755
--- a/src/build/tools/hbRelease
+++ b/src/build/tools/hbRelease
@@ -719,17 +719,19 @@ sub git_commit_history
# sub git_log_changeId
#
-# Determines if a changeId exists in the current branches git log
+# Determines if a changeId exists in the base
#
+# @param[in] base
# @param[in] changeId
#
# @return bool - True if in commit history, False otherwise.
#
sub git_log_changeId
{
+ my $base = shift;
my $changeId = shift;
my $exists = 0;
- open COMMAND, "git log --pretty=\"%b\" --grep=\'Change-Id: $changeId\' |";
+ open COMMAND, "git log $base | grep \'Change-Id: $changeId\' |";
if(<COMMAND> ne "")
{
$exists = 1;
@@ -1350,7 +1352,7 @@ sub config_resolve_level_dep
next;
}
# Check if patch already exists in release base
- if (git_log_changeId($patch))
+ if (git_log_changeId($base, $patch))
{
print "Skipping - patch = $patch already exists in release base = $base\n" if $debug;
next;
@@ -1385,9 +1387,10 @@ sub config_resolve_level_dep
{
$line =~ s/([^:]*):\s*//;
chomp($line);
+ print "Found depends-on: $line\n" if $debug;
# Add dependency if dependency is not already in base release
- if(!git_log_changeId($line))
+ if(!git_log_changeId($base, $line))
{
print "Adding forced dependency $patch:$line\n" if $debug;
config_add_dep($level, $patch, $line);
@@ -1487,30 +1490,32 @@ sub config_release
$patches = gerrit_resolve_patches($level_info->{patches});
$patches = git_order_commits($patches, $level_info);
- if ($debug)
+ print "\n========\nDetermined patch order as:\n";
+ my $i = 1;
+ foreach my $patch (@{$patches})
{
- print "Determined patch order as:\n";
- foreach my $patch (@{$patches})
- {
- print "\t$patch\n";
- }
+ print "$i. $patch\n";
+ $i++;
}
- print "Applying patches...\n";
+ print "\n========\nApplying patches...\n";
+ $i = 1;
foreach my $patch (@{$patches})
{
- print "Applying $patch.\n" if ($debug);
+ print "\n$i. Cherry-picking commit = $patch.\n\n";
unless (git_cherry_pick($patch))
{
+ print `git status`;
system("git reset HEAD --hard");
die "Cherry-pick of $patch failed";
}
+ $i++;
}
- print "Generating release notes...\n";
+ print "\nGenerating release notes...\n";
create_release_notes($level_info->{name}, $level_info);
- print "Creating tag...\n";
+ print "\nCreating tag...\n";
git_create_tag($level_info->{name}, $level_info);
}
OpenPOWER on IntegriCloud