25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

Fix problem with updating deps in rebar.config for non-tags

This commit is contained in:
Paweł Chmielowski 2017-06-28 16:36:59 +02:00
parent 960cf495c6
commit dc7fa076d7

View File

@ -60,7 +60,7 @@ sub update_deps_repos {
system("git", "-C", ".deps-update", "clone", $repo); system("git", "-C", ".deps-update", "clone", $repo);
} elsif (time() - stat($dd)->mtime > 24 * 60 * 60) { } elsif (time() - stat($dd)->mtime > 24 * 60 * 60) {
say "Updating $dep..."; say "Updating $dep...";
system("git", "-C", $dd, "fetch"); system("git", "-C", $dd, "pull");
touch($dd) touch($dd)
} }
} }
@ -134,7 +134,7 @@ sub update_deps_versions {
my $config = slurp $config_path; my $config = slurp $config_path;
for (keys %deps) { for (keys %deps) {
$config =~ s/(\{\s*$_\s*,\s*".*?"\s*,\s*\{\s*git\s*,\s*".*?"\s*,\s*)(?:{\s*tag\s*,\s*"(.*?)"\s*}|"(.*?)" )/$1\{tag, "$deps{$_}"}/s; $config =~ s/(\{\s*$_\s*,\s*".*?"\s*,\s*\{\s*git\s*,\s*".*?"\s*,\s*)(?:{\s*tag\s*,\s*"(.*?)"\s*}|"(.*?)")/$1\{tag, "$deps{$_}"}/s;
} }
write_file($config_path, $config); write_file($config_path, $config);