Skip to content

Commit

Permalink
Don't check for submodules in a release
Browse files Browse the repository at this point in the history
Releases already have all the necessary submodules included. Also we don't
require git to be installed to build releases. Thus don't do any submodule
checks.
  • Loading branch information
PatZim authored and AlexDaniel committed Jul 22, 2019
1 parent 928810c commit 540926b
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions Configure.pl
Expand Up @@ -11,28 +11,30 @@
use FindBin;

BEGIN {
my $set_config = !qx{git config rakudo.initialized};
unless ( -e '3rdparty/nqp-configure/LICENSE' ) {
print "Updating nqp-configure submodule...\n";
my $msg =
qx{git submodule sync --quiet 3rdparty/nqp-configure && git submodule --quiet update --init 3rdparty/nqp-configure 2>&1};
if ( $? >> 8 == 0 ) {
say "OK";
$set_config = 1;
}
else {
if ( $msg =~ /[']([^']+)[']\s+already exists and is not an empty/ )
{
print "\n===SORRY=== ERROR: "
. "Cannot update submodule because directory exists and is not empty.\n"
. ">>> Please delete the following folder and try again:\n$1\n\n";
exit 1;
if ( -d '.git' ) {
my $set_config = !qx{git config rakudo.initialized};
unless ( -e '3rdparty/nqp-configure/LICENSE' ) {
print "Updating nqp-configure submodule...\n";
my $msg =
qx{git submodule sync --quiet 3rdparty/nqp-configure && git submodule --quiet update --init 3rdparty/nqp-configure 2>&1};
if ( $? >> 8 == 0 ) {
say "OK";
$set_config = 1;
}
else {
if ( $msg =~ /[']([^']+)[']\s+already exists and is not an empty/ )
{
print "\n===SORRY=== ERROR: "
. "Cannot update submodule because directory exists and is not empty.\n"
. ">>> Please delete the following folder and try again:\n$1\n\n";
exit 1;
}
}
}
}
if ($set_config) {
system("git config submodule.recurse true");
system("git config rakudo.initialized 1");
if ($set_config) {
system("git config submodule.recurse true");
system("git config rakudo.initialized 1");
}
}
}

Expand Down

0 comments on commit 540926b

Please sign in to comment.