From 56ce900f7b355975308a7e1b22975c9564746a52 Mon Sep 17 00:00:00 2001 From: Akis Maziotis <36594156+phoinixgrr@users.noreply.github.com> Date: Tue, 19 Jul 2022 10:16:40 +0300 Subject: [PATCH] [feat] Notice.txt generation configuration (#20669) We created a tool to automatically generate NOTICE.txt from project folders. And there is a scheduled pipeline configured to run at every Monday which creates a PR if there is a change. We selected build/notice-file directory to store the configuration files. Tool repo: https://github.com/mattermost/notice-file-generator Ticket: https://mattermost.atlassian.net/browse/CLD-3697 --- build/notice-file/Readme.md | 28 ++++++++++++++++++++++++++++ build/notice-file/config.yaml | 11 +++++++++++ 2 files changed, 39 insertions(+) create mode 100644 build/notice-file/Readme.md create mode 100644 build/notice-file/config.yaml diff --git a/build/notice-file/Readme.md b/build/notice-file/Readme.md new file mode 100644 index 0000000000..9d93b96f35 --- /dev/null +++ b/build/notice-file/Readme.md @@ -0,0 +1,28 @@ +# Notice.txt File Configuration + +We are automatically generating Notice.txt by using first-level dependencies of the project. The related pipeline uses `config.yaml` stored in this folder. + + +## Configuration + +Sample: + +``` +title: "Mattermost Playbooks" +copyright: "©2015-present Mattermost, Inc. All Rights Reserved. See LICENSE for license information." +description: "This document includes a list of open source components used in Mattermost Playbooks, including those that have been modified." +search: + - "go.mod" + - "client/go.mod" +dependencies: [] +devDependencies: [] +``` + +| Field | Type | Purpose | +| :-- | :-- | :-- | +| title | string | Field content will be used as a title of the application. See first line of `NOTICE.txt` file. | +| copyright | string | Field content will be used as a copyright message. See second line of `NOTICE.txt` file. | +| description | string | Field content will be used as notice file description. See third line of `NOTICE.txt` file. | +| dependencies | array | If any dependency name mentioned, it will be automatically added even if it is not a first-level dependency. | +| devDependencies | array | If any dependency name mentioned, it will be added when it is referenced in devDependency section. | +| search | array | Pipeline will search for package.json/go.mod files mentioned here. Globstar format is supported ie. `x/**/go.mod`. | diff --git a/build/notice-file/config.yaml b/build/notice-file/config.yaml new file mode 100644 index 0000000000..af214305bb --- /dev/null +++ b/build/notice-file/config.yaml @@ -0,0 +1,11 @@ +--- + +title: "Mattermost Server" +copyright: "©2015-present Mattermost,Inc. All Rights Reserved. See LICENSE for license information." +description: "This document includes a list of open source components used in Mattermost Server, including those that have been modified." +search: + - "go.mod" +dependencies: [] +devDependencies: [] + +...