Skip to content
Permalink
Browse files
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:


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 72d79260162020a61ce236245a3bf62968c027bc
Showing 2 changed files with 40 additions and 7 deletions.
@@ -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";
@@ -91,6 +110,11 @@ sub copyNightlyLauncher
}
}

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

chdirWebKit();
buildNightlyLauncher();
copyNightlyLauncher();
@@ -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.

0 comments on commit 72d7926

Please sign in to comment.