mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-06 12:08:46 +00:00
Building using Github actions (#131)
Change Travis CICD to GitHub Actions
This commit is contained in:
30
cicd_scripts/check_references.php
Normal file
30
cicd_scripts/check_references.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
function print_usage()
|
||||
{
|
||||
fwrite(STDERR,
|
||||
"USAGE:\n"
|
||||
. " php check_references.php mdfile\n"
|
||||
);
|
||||
}
|
||||
|
||||
if ($argc < 2) {
|
||||
fwrite(STDERR, "Invalid arguments:\n");
|
||||
print_usage();
|
||||
exit(1);
|
||||
}
|
||||
|
||||
$mdfile = $argv[1];
|
||||
|
||||
$data = file_get_contents($mdfile);
|
||||
|
||||
if(preg_match_all('/\[([^\]]+)\][^(:]/', $data."\n",$m))
|
||||
{
|
||||
$references = $m[1];
|
||||
foreach($references as $r)
|
||||
{
|
||||
if(!preg_match("/\[".preg_quote($r,"/")."\]:(.*)/", $data,$m2)){
|
||||
echo "Missing reference for [$r] !\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user