Ejemplo n.º 1
0
#!/usr/bin/php
<?php 
$project = $argv[1];
replaceTextInFile('skeletonSimpleProject', $project, 'src/skeletonSimpleProject/skeletonSimpleProject.php');
rename('src/skeletonSimpleProject/skeletonSimpleProject.php', 'src/skeletonSimpleProject/' . $project . '.php');
rename('src/skeletonSimpleProject', 'src/' . $project);
replaceTextInFile('skeletonSimpleProject', $project, 'tests/skeletonSimpleProject/Tests/skeletonSimpleProjectTest.php');
rename('tests/skeletonSimpleProject/Tests/skeletonSimpleProjectTest.php', 'tests/skeletonSimpleProject/Tests/' . $project . 'Test.php');
rename('tests/skeletonSimpleProject', 'tests/' . $project);
replaceTextInFile('skeletonSimpleProject', $project, 'composer.json');
replaceTextInFile('skeletonSimpleProject', $project, 'phpunit.xml.dist');
function replaceTextInFile($oldValue, $newValue, $file)
{
    $text = file_get_contents($file);
    $newText = str_replace($oldValue, $newValue, $text);
    file_put_contents($file, $newText);
}
Ejemplo n.º 2
0
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 system("cp -p '{$sourceRootDir}/release-building/LiesMich_RW.html' '{$sVolume}/LiesMich.html'", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 system("cp -R -p '{$sourceRootDir}/webyep-rwx/{$sRWPluginBuildSubPath}' '{$sVolume}'", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 system("cp -R -p webyep-system '{$sVolume}'", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 replaceTextInFile("{$sVolume}/webyep-system/konfiguration.php", array('$webyep_sCharset = "";' => '$webyep_sCharset = "utf-8";'));
 // copy the webloc file with system since it is a resource fork!
 system("cp -p '{$sourceRootDir}/release-building/WebYep Dokumentation.html' '{$sVolume}/WebYep Dokumentation.html'", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 copy("{$sourceRootDir}/release-building/WebYep Lizenzbedingungen.html", "{$sVolume}/WebYep Lizenzbedingungen.html") or fatal(__LINE__);
 system("{$sHdiutil} detach '{$sVolume}'{$Q}", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 system("{$sHdiutil} convert {$sWorkDMG}{$Q} -format UDZO -o '{$sReleaseDMG}' ", $iRet);
 if ($iRet != 0) {
     fatal(__LINE__);
 }
 unlink($sWorkDMG);