From b7165a0f5f30212785a4127cd3a8248ee4f5bb56 Mon Sep 17 00:00:00 2001 From: Mario de Frutos Dieguez Date: Wed, 14 Aug 2019 23:40:52 +0200 Subject: [PATCH] Mark manifest.[go|js] as a generated file (#57) manifest.[go|js] files are autogenerated so we dont need to show diffs, cope with conflicts in merge operations or show the diff in github. --- .gitattributes | 2 ++ build/manifest/main.go | 8 ++++++-- server/manifest.go | 2 ++ webapp/src/manifest.js | 2 ++ 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4bd338f --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +server/manifest.go linguist-generated=true +webapp/src/manifest.js linguist-generated=true diff --git a/build/manifest/main.go b/build/manifest/main.go index cbc96e9..5db5aaa 100644 --- a/build/manifest/main.go +++ b/build/manifest/main.go @@ -10,7 +10,9 @@ import ( "github.com/pkg/errors" ) -const pluginIDGoFileTemplate = `package main +const pluginIDGoFileTemplate = `// This file is automatically generated. Do not modify it manually. + +package main var manifest = struct { ID string @@ -21,7 +23,9 @@ var manifest = struct { } ` -const pluginIDJSFileTemplate = `export const id = '%s'; +const pluginIDJSFileTemplate = `// This file is automatically generated. Do not modify it manually. + +export const id = '%s'; export const version = '%s'; ` diff --git a/server/manifest.go b/server/manifest.go index 19a2ccd..471775b 100644 --- a/server/manifest.go +++ b/server/manifest.go @@ -1,3 +1,5 @@ +// This file is automatically generated. Do not modify it manually. + package main var manifest = struct { diff --git a/webapp/src/manifest.js b/webapp/src/manifest.js index a1eefd4..52d1e5b 100644 --- a/webapp/src/manifest.js +++ b/webapp/src/manifest.js @@ -1,2 +1,4 @@ +// This file is automatically generated. Do not modify it manually. + export const id = 'com.mattermost.plugin-starter-template'; export const version = '0.1.0';