-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply and enforce file-level license headers #869
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b7ea2e6
Apply and enforce file-level license headers
lieut-data 0771c64
align plugin-ci with go.mod version
lieut-data a05a631
switch to 2018
lieut-data cceb480
bundle LICENSE.txt and NOTICE.txt if they exist
lieut-data e9ab975
updated NOTICE.txt and configuration
lieut-data File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "Mattermost GitHub Plugin" | ||
copyright: "©2018-present Mattermost, Inc. All Rights Reserved. See LICENSE.txt for license information." | ||
description: "This document includes a list of open source components used in the plugin, including those that have been modified." | ||
search: | ||
- "go.mod" | ||
- "webapp/package.json" | ||
dependencies: [] | ||
devDependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ server/plugin/manifest.go | |
|
||
# VS Code | ||
.vscode | ||
|
||
# notice | ||
.notice-work |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,6 +160,7 @@ install-go-tools: | |
@echo Installing go tools | ||
$(GO) install github.com/golangci/golangci-lint/cmd/[email protected] | ||
$(GO) install gotest.tools/[email protected] | ||
$(GO) install github.com/mattermost/mattermost-govet/v2@3f08281c344327ac09364f196b15f9a81c7eff08 | ||
|
||
## Runs eslint and golangci-lint | ||
.PHONY: check-style | ||
|
@@ -178,6 +179,7 @@ ifneq ($(HAS_SERVER),) | |
@echo Running golangci-lint | ||
$(GO) vet ./... | ||
$(GOBIN)/golangci-lint run ./... | ||
$(GO) vet -vettool=$(GOBIN)/mattermost-govet -license -license.year=2018 ./... | ||
endif | ||
|
||
## Builds the server, if it exists, for all supported architectures, unless MM_SERVICESETTINGS_ENABLEDEVELOPER is set | ||
|
@@ -224,6 +226,12 @@ bundle: | |
rm -rf dist/ | ||
mkdir -p dist/$(PLUGIN_ID) | ||
./build/bin/manifest dist | ||
ifneq ($(wildcard LICENSE.txt),) | ||
cp -r LICENSE.txt dist/$(PLUGIN_ID)/ | ||
endif | ||
ifneq ($(wildcard NOTICE.txt),) | ||
cp -r NOTICE.txt dist/$(PLUGIN_ID)/ | ||
endif | ||
ifneq ($(wildcard $(ASSETS_DIR)/.),) | ||
cp -r $(ASSETS_DIR) dist/$(PLUGIN_ID)/ | ||
endif | ||
|
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is unique in all the others in that I couldn't get
mattermost-govet
as built to run withgo vet
, it seems because the toolchain version installed was different thango.mod
.Aligning this here fixed the issue... but that technically potentially changes the Go version we're building the core plugin with (even though it should have been that way), and I'm surfacing here for visibility.