Skip to content

Commit 816a98d

Browse files
committed
Fix the SDK Downloader
* Remove the check for a git repo, as we are always in the Mono git repo, and never an SDK git repo. All of the SDKs we use this for now are in Mercurial. * Make the Mercurial parent revision check actually work by changing to the SDK repo directory.
1 parent f43bb15 commit 816a98d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

external/buildscripts/SDKDownloader.pm

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,17 +176,20 @@ sub UpdateSDKRepo
176176

177177
my $parent_rev = "parent";
178178

179-
# check if we're in a mercurial repo
180-
if (system("hg parent --template \"{node}\"") == 0)
181-
{
182-
$parent_rev = `hg parent --template "{node}"`;
183-
}
184-
# check if we're in a git repo
185-
elsif (system("git rev-parse HEAD") == 0)
179+
if (-d $repo_name)
186180
{
187-
$parent_rev = `git rev-parse HEAD`;
181+
my $cwd = getcwd;
182+
chdir($repo_name);
183+
184+
# check if we're in a mercurial repo
185+
if (system("hg parent --template \"{node}\"") == 0)
186+
{
187+
$parent_rev = `hg parent --template "{node}"`;
188+
}
189+
# else we'll just pull every time
190+
191+
chdir($cwd);
188192
}
189-
# else we'll just pull every time
190193

191194
my $old_rev = "";
192195

0 commit comments

Comments
 (0)