Reviewed by Oliver.
Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.
* BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
* WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25916
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
chdirWebKit();
}
+sub currentSVNBranch
+{
+ 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\/[^\/]+)/);
+ die "Unable to determine current SVN branch in $sourceDir" unless (defined $branch);
+ $branch =~ s/^branches\///;
+ return $branch
+}
+
sub copyNightlyLauncher
{
my $revision = currentSVNRevision();
+ my $branch = currentSVNBranch();
my $infoPlist = "$nightlyLauncherStagingPath/Contents/Info.plist";
my $versionFile = "$nightlyLauncherStagingPath/Contents/Resources/VERSION";
+ my $branchFile = "$nightlyLauncherStagingPath/Contents/Resources/BRANCH";
my $data;
open(IN, $infoPlist) or die "Couldn't open Info.plist in built application for reading";
{
print OUT "$revision\n";
close(OUT);
+ open(OUT, ">$branchFile") or die "Couldn't open BRANCH in built application for writing";
+ print OUT "$branch\n";
+ close(OUT);
+
my @frameworks = ("JavaScriptCore", "JavaScriptGlue", "WebCore", "WebKit");
for my $framework (@frameworks) {
system("ditto", productDir() . "/$framework.framework", "$nightlyLauncherStagingPath/Contents/Resources/$framework.framework") == 0 or die "Failed copying $framework.framework into $nightlyLauncherStagingPath";
+2007-10-02 Mark Rowe <mrowe@apple.com>
+
+ Reviewed by Oliver.
+
+ Update WebKitLauncher to notify you of new builds from the correct branch, rather than always checking trunk.
+
+ * BuildSlaveSupport/build-launcher-app: Generate a file named BRANCH into WebKit.app so that it knows which branch it was built from.
+ * WebKitLauncher/start.html: Use the new URL format that includes the branch we were built from.
+
2007-10-02 Mark Rowe <mrowe@apple.com>
Rubber-stamped by Maciej.
<html>
<head>
<title>Loading WebKit...</title>
- <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/?current-revision=unknown" />
+ <meta http-equiv="refresh" content="1;URL=http://nightly.webkit.org/start/" />
<script type="text/javascript">
function getWebKitRevision()
{
request.send();
var revision = parseInt(request.responseText);
if (isNaN(revision))
- return "unknown";
+ return "";
return revision;
}
+ function getWebKitBranch()
+ {
+ var request = new XMLHttpRequest();
+ request.open("GET", "BRANCH", false);
+ request.send();
+ return (request.responseText || "trunk").replace(/\s/g, '')
+ }
+
var revision = getWebKitRevision();
- document.location = "http://nightly.webkit.org/start/?current-revision=" + revision;
+ var branch = getWebKitBranch();
+ document.location = "http://nightly.webkit.org/start/" + branch + "/" + revision;
</script>
</head>
<body>