Skip to content

Commit

Permalink
Fix devkit to update keys as well as phars
Browse files Browse the repository at this point in the history
  • Loading branch information
jakzal committed Feb 19, 2019
1 parent 6b20769 commit 2c33096
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bin/devkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,16 @@ function (string $phar) {
$project = preg_replace('@https://[^/]*/([^/]*/[^/]*).*@', '$1', $phar);

return strtr(
'-e "s@\"phar\": \"\([^\"]*%PROJECT%[^\"]*\)\"@\"phar\": \"%PHAR%\"@"',
'-e "s@\"phar\": \"([^\"]*%PROJECT%[^\"]*)\"@\"phar\": \"%PHAR%\"@g"'.
' '.
'-e "s@\"url\": \"([^\"]*%PROJECT%[^\"]*\.phar(\.asc|\.pubkey))\"@\"url\": \"%PHAR%\\2\"@g"',
['%PROJECT%' => $project, '%PHAR%' => $phar]
);
},
$phars
));

return new ShCommand(sprintf('sed -i.bak %s %s', $replacements, $jsonPath));
return new ShCommand(sprintf('sed -i.bak -E %s %s', $replacements, $jsonPath));
}
}
);
Expand Down Expand Up @@ -266,4 +268,4 @@ function ($htmls) {
}
}
);
$application->run();
$application->run();

0 comments on commit 2c33096

Please sign in to comment.