infrajs/update

该软件包的最新版本(v1.1.11)没有可用的许可信息。

自动安装插件。更新配置中的属性

v1.1.11 2020-08-05 09:00 UTC

This package is auto-updated.

Last update: 2024-09-05 18:41:23 UTC


README

.infra.json 中添加 update 属性的处理

通过 composer 安装

{
	"require":{
		"infrajs/update":"~1"
	}
}

使用说明

在 .infra.json 中指定 update 属性,该属性指向执行安装的脚本地址

{
	"update":"update.php"
}

存在的 "require" 属性(自动连接扩展)在 "update" 之后执行。区别在于 "require" 恒定执行,而 "update" 仅在特定事件发生时执行

  • 启动 Update::exec();
  • 存在 ~update 文件
  • 如果没有缓存文件夹
  • 当 GET 参数中包含 -update=true 时

测试

如果通过浏览器打开地址 vendor/infrajs/update/tester.php,会显示安装信息,并在项目根目录下创建缓存文件夹,如果文件夹已存在,则不会执行安装。