From 0a3feaff107384b27965fcb9d2e6111b431122e9 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Mon, 9 Sep 2024 17:17:44 +0800 Subject: [PATCH] Update docs about source module --- docs/en/develop/source-module.md | 21 +++++++++++++++++++++ docs/zh/develop/source-module.md | 20 ++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/docs/en/develop/source-module.md b/docs/en/develop/source-module.md index 561c1b7c..4b1b1fc0 100644 --- a/docs/en/develop/source-module.md +++ b/docs/en/develop/source-module.md @@ -317,3 +317,24 @@ When an open source project has multiple licenses, multiple files can be specifi } } ``` + +When the license of an open source project uses different files between versions, +`path` can be used as an array to list the possible license files: + +```json +{ + "redis": { + "type": "git", + "path": "php-src/ext/redis", + "rev": "release/6.0.2", + "url": "https://github.com/phpredis/phpredis", + "license": { + "type": "file", + "path": [ + "LICENSE", + "COPYING" + ] + } + } +} +``` diff --git a/docs/zh/develop/source-module.md b/docs/zh/develop/source-module.md index a97dce34..00feb3c4 100644 --- a/docs/zh/develop/source-module.md +++ b/docs/zh/develop/source-module.md @@ -297,3 +297,23 @@ pkg.json 存放的是非源码类型的文件资源,例如 musl-toolchain、UP } } ``` + +当一个开源项目的许可证在不同版本间使用不同的文件,`path` 参数可以使用数组将可能的许可证文件列出: + +```json +{ + "redis": { + "type": "git", + "path": "php-src/ext/redis", + "rev": "release/6.0.2", + "url": "https://github.com/phpredis/phpredis", + "license": { + "type": "file", + "path": [ + "LICENSE", + "COPYING" + ] + } + } +} +```