当前位置: 首页>>代码示例>>PHP>>正文


PHP PEAR_PackageFileManager2::addIgnoreToRelease方法代码示例

本文整理汇总了PHP中PEAR_PackageFileManager2::addIgnoreToRelease方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_PackageFileManager2::addIgnoreToRelease方法的具体用法?PHP PEAR_PackageFileManager2::addIgnoreToRelease怎么用?PHP PEAR_PackageFileManager2::addIgnoreToRelease使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PEAR_PackageFileManager2的用法示例。


在下文中一共展示了PEAR_PackageFileManager2::addIgnoreToRelease方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main

    public function main()
    {
        require_once 'PEAR/PackageFileManager2.php';
        require_once 'PEAR/Exception.php';
        PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception');
        if (!$this->baseDir || !file_exists($this->baseDir)) {
            throw new BuildException('Base directory is not defined or does not exist.');
        }
        if (!$this->buildDir || !file_exists($this->buildDir)) {
            throw new BuildException('Build directory is not defined or does not exist.');
        }
        set_time_limit(0);
        $this->log("Adding .keep files to empty directories", PROJECT_MSG_INFO);
        foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator(realpath('samples')), RecursiveIteratorIterator::CHILD_FIRST) as $dir) {
            if ($dir->isDir()) {
                foreach (new DirectoryIterator($dir->getPathname()) as $d) {
                    if (!in_array($d->getFilename(), array('.', '..'))) {
                        continue 2;
                    }
                }
                touch($dir->getPathname() . '/.keep');
            }
        }
        $this->log("Building package contents in: {$this->dir}", PROJECT_MSG_INFO);
        $version = $this->project->getProperty('agavi.pear.version');
        $status = $this->project->getProperty('agavi.status');
        // Modify short description. Try to keep under 80 chars width
        $shortDesc = <<<EOD
PHP5 MVC Application Framework
EOD;
        // Modify long description. Try to keep under 80 chars width
        $longDesc = <<<EOD
Agavi is a full-featured MVC-style framework for PHP5 with a strong focus on structure, code reusability and flexibility.
EOD;
        $p2 = new PEAR_PackageFileManager2();
        $p2->setOptions(array('filelistgenerator' => 'file', 'outputdirectory' => $this->baseDir, 'packagedirectory' => $this->buildDir, 'baseinstalldir' => 'agavi', 'ignore' => array('.svn/'), 'addhiddenfiles' => true, 'dir_roles' => array('/' => 'php', 'bin' => 'script', 'samples' => 'data'), 'installexceptions' => array('bin/agavi-dist' => '/', 'bin/agavi.bat-dist' => '/'), 'exceptions' => array('API_CHANGELOG' => 'doc', 'CHANGELOG' => 'doc', 'COPYRIGHT' => 'doc', 'INSTALL' => 'doc', 'LICENSE' => 'doc', 'LICENSE-AGAVI' => 'doc', 'LICENSE-ICU' => 'doc', 'LICENSE-SCHEMATRON' => 'doc', 'LICENSE-UNICODE_CLDR' => 'doc', 'RELEASE_NOTES' => 'doc', 'UPGRADING' => 'doc')));
        $p2->setPackageType('php');
        $p2->setPackage('agavi');
        $p2->addMaintainer('lead', 'david', 'David Zülke', 'david.zuelke@bitextender.com');
        $p2->addMaintainer('developer', 'dominik', 'Dominik del Bondio', 'dominik.del.bondio@bitextender.com');
        $p2->addMaintainer('developer', 'felix', 'Felix Gilcher', 'felix.gilcher@bitextender.com');
        $p2->addMaintainer('developer', 'impl', 'Noah Fontes', 'nfontes@cynigram.com');
        $p2->addMaintainer('developer', 'v-dogg', 'Veikko Mäkinen', 'mail@veikkomakinen.com');
        $p2->setChannel('pear.agavi.org');
        $p2->setReleaseVersion($version);
        $p2->setAPIVersion($version);
        $p2->setReleaseStability($status);
        $p2->setAPIStability($status);
        $p2->setSummary($shortDesc);
        $p2->setDescription($longDesc);
        $p2->setNotes("To see what's new, please refer to the RELEASE_NOTES. Also, the CHANGELOG contains a full list of changes.\n\nFor installation instructions, consult INSTALL. Information on how to migrate applications written using previous releases can be found in UPGRADING.");
        // this must be the most stupid syntax I've ever seen.
        $p2->addRelease();
        $p2->setOSInstallCondition('windows');
        $p2->addInstallAs('bin/agavi.bat-dist', 'agavi.bat');
        $p2->addIgnoreToRelease('bin/agavi-dist');
        // and the next release... very cool, eh? how utterly stupid is that
        $p2->addRelease();
        $p2->addInstallAs('bin/agavi-dist', 'agavi');
        $p2->addIgnoreToRelease('bin/agavi.bat-dist');
        $p2->addPackageDepWithChannel('required', 'phing', 'pear.phing.info', '2.4.0');
        $p2->addPackageDepWithChannel('optional', 'PHPUnit', 'pear.phpunit.de', '3.7.0');
        $p2->addConflictingPackageDepWithChannel('phing', 'pear.php.net');
        $p2->setPhpDep('5.2.0');
        $p2->addExtensionDep('required', 'dom');
        $p2->addExtensionDep('required', 'libxml');
        $p2->addExtensionDep('required', 'SPL');
        $p2->addExtensionDep('required', 'Reflection');
        $p2->addExtensionDep('required', 'pcre');
        $p2->addExtensionDep('optional', 'xsl');
        $p2->addExtensionDep('optional', 'tokenizer');
        $p2->addExtensionDep('optional', 'session');
        $p2->addExtensionDep('optional', 'xmlrpc');
        $p2->addExtensionDep('optional', 'PDO');
        $p2->addExtensionDep('optional', 'iconv');
        $p2->addExtensionDep('optional', 'gettext');
        $p2->setPearinstallerDep('1.4.0');
        $p2->setLicense('LGPL', 'http://www.gnu.org/copyleft/lesser.html');
        $p2->addReplacement('bin/agavi-dist', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->addReplacement('bin/agavi-dist', 'pear-config', '@PHP-BIN@', 'php_bin');
        $p2->addReplacement('bin/agavi.bat-dist', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->addReplacement('bin/agavi.bat-dist', 'pear-config', '@PHP-BIN@', 'php_bin');
        $p2->addReplacement('src/build/build.xml', 'pear-config', '@PEAR-DIR@', 'php_dir');
        $p2->generateContents();
        try {
            $p2->writePackageFile();
        } catch (PEAR_Exception $e) {
            $this->log("Oops! Caught PEAR Exception: " . $e->getMessage());
        }
    }
开发者ID:horros,项目名称:agavi,代码行数:90,代码来源:AgaviPackageTask.php

示例2: die

// Who maintains this package
$packagexml->addMaintainer('lead', 'john', 'John Peterson', 'johnpipi@gmail.com');
$packagexml->addMaintainer('developer', 'haas', 'Walt Haas', 'haas@xmission.com');
// Substitute local configuration values for these symbols
$packagexml->addGlobalReplacement('pear-config', '@BIN-DIR@', 'bin_dir');
$packagexml->addGlobalReplacement('pear-config', '@DOC-DIR@', 'doc_dir');
$packagexml->addGlobalReplacement('pear-config', '@PHP-DIR@', 'php_dir');
$packagexml->addGlobalReplacement('pear-config', '@DATA-DIR@', 'data_dir');
$packagexml->addGlobalReplacement('pear-config', '@PHP-BIN@', 'php_bin');
$packagexml->addGlobalReplacement('pear-config', '@TEST-DIR@', 'test_dir');
// Platform-dependent command lines
$packagexml->addRelease();
// set up a release section
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('pear-trax.bat', 'trax');
$packagexml->addIgnoreToRelease('pear-trax');
$packagexml->addRelease();
// add another release section for all other OSes
$packagexml->addInstallAs('pear-trax', 'trax');
$packagexml->addIgnoreToRelease('pear-trax.bat');
// create the <contents> tag
$packagexml->generateContents();
// Study the Subversion .svn directories to see what goes in the
// package, then write package.xml
$e = $packagexml->writePackageFile();
if (PEAR::isError($e)) {
    die($e->getMessage());
}
// Make a tarball of the files listed in package.xml
$packager = new PEAR_Packager();
$e = $packager->package();
开发者ID:phpontrax,项目名称:trax,代码行数:31,代码来源:make-pkg.php

示例3:

$pfm->setSummary('XRef - php source file toolkit');
$pfm->setDescription('XRef Lint - php lint and crossref doc tool');
$pfm->setChannel('pear.xref-lint.net');
$pfm->setAPIVersion($version);
$pfm->setReleaseVersion($version);
$pfm->setReleaseStability('stable');
$pfm->setAPIStability('stable');
$pfm->setNotes("v1.0.0 release candidate #1");
$pfm->setPackageType('php');
// dependencies
//$pfm->addDependency("Console_Getopt");
// windows-release
$pfm->addRelease();
// set up a release section
$pfm->setOSInstallCondition('windows');
$pfm->addIgnoreToRelease('bin/xref-lint');
$pfm->addIgnoreToRelease('bin/xref-doc');
$pfm->addIgnoreToRelease('bin/xref-ci');
$pfm->addIgnoreToRelease('bin/git-xref-lint');
$pfm->addInstallAs('bin/xref-lint.bat', 'xref-lint.bat');
$pfm->addInstallAs('bin/xref-doc.bat', 'xref-doc.bat');
// other platforms
$pfm->addRelease();
$pfm->addIgnoreToRelease('bin/xref-lint.bat');
$pfm->addIgnoreToRelease('bin/xref-doc.bat');
$pfm->addInstallAs('bin/xref-lint', 'xref-lint');
$pfm->addInstallAs('bin/xref-doc', 'xref-doc');
$pfm->addInstallAs('bin/xref-ci', 'xref-ci');
$pfm->addInstallAs('bin/git-xref-lint', 'git-xref-lint');
$pfm->setPhpDep('5.2.0');
$pfm->setPearinstallerDep('1.4.0a12');
开发者ID:gariev,项目名称:xref,代码行数:31,代码来源:makePackageFile.php

示例4:

$packagexml->setPhpDep('5.2.0');
$packagexml->setPearinstallerDep('1.3.5');
$packagexml->addPackageDepWithChannel('optional', 'DB', 'pear.php.net');
$packagexml->addPackageDepWithChannel('optional', 'Smarty', $ethna_channel);
$packagexml->addPackageDepWithChannel('optional', 'simpletest', $ethna_channel);
$packagexml->addMaintainer('lead', 'sotarok', 'Sotaro Karasawa', 'sotaro.k@gmail.com');
$packagexml->setLicense('The BSD License', 'http://www.opensource.org/licenses/bsd-license.php');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.bat', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PHP-BINARY@', 'php_bin');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PEAR-DIR@', 'php_dir');
$packagexml->addReplacement('bin/ethna.sh', 'pear-config', '@PHP-BIN@', 'bin_dir');
$packagexml->addRelease();
$packagexml->setOSInstallCondition('windows');
$packagexml->addInstallAs('bin/ethna.bat', 'ethna.bat');
$packagexml->addIgnoreToRelease('bin/ethna.sh');
$packagexml->addRelease();
$packagexml->addInstallAs('bin/ethna.sh', 'ethna');
$packagexml->addIgnoreToRelease('bin/ethna.bat');
$packagexml->generateContents();
if ($is_old_package) {
    if (method_exists($packagexml, 'exportCompatiblePackageFile1')) {
        $pkg =& $packagexml->exportCompatiblePackageFile1();
        $pkg->writePackageFile();
    } else {
        //  PEAR package version 1 is not supported over PEAR 1.8.0.
        echo "WARNING: PEAR package version 1 is not supported in this PEAR version.\n";
    }
} else {
    $packagexml->writePackageFile();
}
开发者ID:riaf,项目名称:pastit,代码行数:31,代码来源:ethna_make_package.php


注:本文中的PEAR_PackageFileManager2::addIgnoreToRelease方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。