Skip to content

Commit

Permalink
Reviewed by Mark Rowe
Browse files Browse the repository at this point in the history
Make build-launcher-app work when run from a git repository.
https://bugs.webkit.org/show_bug.cgi?id=20478

* BuildSlaveSupport/build-launcher-app:


Canonical link: https://commits.webkit.org/28286@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35880 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
smfr committed Aug 21, 2008
1 parent 0a11e55 commit 72d7926
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 7 deletions.
38 changes: 31 additions & 7 deletions WebKitTools/BuildSlaveSupport/build-launcher-app
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,40 @@ sub buildNightlyLauncher
chdirWebKit();
}

sub currentSVNBranch
sub currentRevision
{
my $sourceDir = sourceDir();
my $svnInfo = `LC_ALL=C svn info $sourceDir | grep URL:`;
(my $url) = ($svnInfo =~ m/URL: (.+)/g);
(my $branch) = ($url =~ m/\/svn\/webkit\/(trunk|branches\/[^\/]+)/);
if (isSVNDirectory($sourceDir)) {
return currentSVNRevision();
} elsif (isGitDirectory($sourceDir)) {
my $gitLog = `cd $sourceDir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`;
(my $revision) = ($gitLog =~ m/ +git-svn-id: .+@(\d+) /g);
return $revision;
}
}

sub currentBranch
{
my $sourceDir = sourceDir();
my ($url, $branch);
if (isSVNDirectory($sourceDir)) {
my $svnInfo = `LC_ALL=C svn info $sourceDir | grep URL:`;
($url) = ($svnInfo =~ m/URL: (.+)/g);
} elsif (isGitDirectory($sourceDir)) {
my $gitLog = `cd $sourceDir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`;
($url) = ($gitLog =~ m/ +git-svn-id: (.+)@\d+ /g);
}
($branch) = ($url =~ m/\/webkit\/(trunk|branches\/[^\/]+)/);
die "Unable to determine current SVN branch in $sourceDir" unless (defined $branch);
$branch =~ s/^branches\///;
return $branch
return $branch;
}

sub copyNightlyLauncher
{
my $revision = currentSVNRevision();
my $branch = currentSVNBranch();
my $revision = currentRevision();
my $branch = currentBranch();

my $infoPlist = "$nightlyLauncherStagingPath/Contents/Info.plist";
my $versionFile = "$nightlyLauncherStagingPath/Contents/Resources/VERSION";
my $branchFile = "$nightlyLauncherStagingPath/Contents/Resources/BRANCH";
Expand Down Expand Up @@ -91,6 +110,11 @@ sub copyNightlyLauncher
}
}

my $b = currentBranch();
my $r = currentRevision();
print "Branch: ", $b, "\n";
print "Revision: ", $r, "\n";

chdirWebKit();
buildNightlyLauncher();
copyNightlyLauncher();
9 changes: 9 additions & 0 deletions WebKitTools/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2008-08-21 Simon Fraser <simon.fraser@apple.com>

Reviewed by Mark Rowe

Make build-launcher-app work when run from a git repository.
https://bugs.webkit.org/show_bug.cgi?id=20478

* BuildSlaveSupport/build-launcher-app:

2008-08-20 Maxime Britto <britto@apple.com>

Reviewed by Ada Chan.
Expand Down

0 comments on commit 72d7926

Please sign in to comment.