de-swebhosting / typo3-surf-hardlink-release
TYPO3 Surf 的硬链接发布
v1.0.0
2022-10-14 11:50 UTC
Requires
- php: >=7.4 <8.2
- typo3/surf: ^3.1
Requires (Dev)
- de-swebhosting/php-codestyle: ^4.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-09-11 13:45:28 UTC
README
此仓库为 TYPO3 Surf 提供了一个任务,用于使用硬链接而不是软链接来发布您的应用程序。
工作原理
当应用程序发布时,发布目录使用硬链接复制到下一个目录
cp -al 20201228192426 next
要将发布切换到新版本,需要将当前目录和下一个目录移动
mv ./current ./previous mv ./next ./current
如何使用
在您的应用程序的 registerTasks()
方法中,您可以使用 HardlinkReleaseRegisterer
来将符号链接发布替换为硬链接发布
(new \De\SWebhosting\TYPO3Surf\HardlinkReleaseRegisterer()) ->replaceSymlinkWithHardlinkRelease($workflow, $this);