

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# FreeRTOS 清单文件说明
<a name="afq-checklist-manifest-instr"></a>

需要清单文件 AWS IoT Device Tester 才能识别正在使用的版本和库。它可以帮助客户描述版本、库依赖项和元数据。

该文件应满足以下要求：
+ 文件必须命名为 `manifest.yml`。
+ 它必须位于库或软件包的基本文件夹中。
+ 它必须采用 YAML 格式且符合 [YAML 1.2 规范](https://yaml.org/spec/1.2/spec.html)。

参数可以按任意顺序排列，但为了便于阅读，我们建议按以下顺序排列。在文件中添加注释以帮助客户使用您的软件包。

**文件路径**  
位于软件包或库的根目录中。每个软件包只有一个清单文件。引入的依赖项可能有自己的清单文件。

**参数**    
**name**  
软件包的名称。所有空格都应替换为下划线 (\$1)。例如，`My project name - 2020` 应更改为 `My_project_name_-_2020`。  
+ type: string
+ required: true
+ minLength: 1
+ maxLength: 40  
**版本**  
软件包的版本。版本可以是发布版本或版本标签。  
+ type: string
+ required: true
+ minLength: 1
+ maxLength: 30  
**描述**  
用户可读的软件包描述。描述应清楚地介绍软件包是什么以及提供的内容。  
+ type: string
+ required: true
+ MinLength: 1
+ MaxLength: 2048  
**依赖项**  
用户成功构建此软件包所需的所有第一级依赖项的列表，Git、Subversion 或 Mercurial 源代码主机可检索这些依赖项。不要包含无法通过 Git、SVG 或 hg 获得的依赖项。不要包含用于测试、文档生成或开发的依赖项。为了提升体验，我们建议您避免列出封闭或私有的依赖项。  
+ 类型：数组
+ required: false
+ minLength: 0  
**dependencies[].name**  
依赖项的软件包名称。这必须与依赖项的 `name` 参数中的软件包名称相匹配。  
+ type: string
+ required: true
+ minLength: 1
+ maxLength: 40  
**dependencies[].version**  
依赖项的版本。版本可以是发布版本或版本标签。如果软件包本身包含依赖项，则版本必须与依赖项中的清单文件相匹配。  
+ type: string
+ required: true
+ minLength: 1
+ maxLength: 30  
**dependencies[].repository**  
描述依赖项源代码的位置。  
+ type: dictionary
+ required: true  
**dependencies[].repository.type**  
存储库的类型。  
+ type: string
+ required: true
+ enum: [git, svn, hg]  
**dependencies[].repository.url**  
存储库位置的 URL。这必须是带有协议前缀的完整 URL（例如 https://github.com/*ACCOUNT\$1NAME*/*REPO\$1NAME*）。  
+ type: string
+ required: true  
**dependencies[].repository.path**  
依赖项从项目工作区开始的相对路径。  
+ type: string
+ required: true  
**dependencies[].repository.branch**  
使用的依赖项的分支。如果软件包使用库的发布分支，那么，为了尽量缩短清单的长度，请不要包含此参数。  
+ type: string
+ required: false  
**license**  
库的 SPDX 许可证标识符。有关完整列表，请参阅 [https://spdx.org/licenses/](https://spdx.org/licenses/)。它应该与存储库根目录中包含的 `LICENSE` 文件（如果存在）相匹配。  
+ type: string
+ required: true

# 示例 manifest.yml
<a name="afq-checklist-manifest-example"></a>

```
---
# This is an example of the manifest file that is included at the root of all FreeRTOS GitHub repositories.

name : "Project_Name"
version: "202012.00-LTS"
description: "Clear concise description of this project."         

dependencies:
  - name: "dependency_1"
    version: "v1.0.0"
    repository:
      type: "git"
      url: "https://github.com/account/dependency_1"
      path: "/relative/path/from/project/root/to/dependency_1"
      branch: "1.x"
  - name: "dependency_2"
    version: "v1.0.1_LTS"
    repository:
      type: "git"
      url: "https://github.com/account/dependency_1"
      path: "/relative/path/from/project/root/to/dependency_2"

license: "MIT"
```