Created
February 3, 2014 20:55
-
-
Save spekkionu/8792201 to your computer and use it in GitHub Desktop.
Build swiftmailer as phar
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$srcRoot = realpath(__DIR__."/vendor/swiftmailer/swiftmailer/lib"); | |
$buildRoot = realpath(__DIR__); | |
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($srcRoot, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::LEAVES_ONLY); | |
echo "Build SwiftMailer phar\n"; | |
$phar = new Phar($buildRoot.'/swiftmailer.phar', 0, 'swiftmailer.phar'); | |
$phar->buildFromIterator($iterator, $srcRoot); | |
$phar->setStub($phar->createDefaultStub("swift_required.php")); | |
exit("Build complete\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"swiftmailer/swiftmailer": "@stable" | |
}, | |
"config": { | |
"preferred-install": "dist" | |
}, | |
"prefer-stable": true, | |
"scripts": { | |
"post-update-cmd": "php build.php", | |
"post-install-cmd": "php build.php" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment