Skip to content
Permalink
Browse files

Don't check for submodules in a release

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 18, 2019
1 parent 928810c commit 540926bf66e8d2ee1c78389f9ad87bd62488b0a8
Showing with 22 additions and 20 deletions.
  1. +22 −20 Configure.pl
@@ -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");
}
}
}

0 comments on commit 540926b

Please sign in to comment.
You can’t perform that action at this time.