mattermost / mattermost-plugin-starter-template

Build scripts and templates for writing Mattermost plugins.
https://developers.mattermost.com/extend/plugins/
Apache License 2.0
129 stars 120 forks source link

Extract plugin version from manifest #8

Closed hanzei closed 6 years ago

hanzei commented 6 years ago

This allows for e.g. log messenger when the plugin starts with the current version.

I have no experience in js. Should similar changes be made to plugin_id.js?

hanzei commented 6 years ago

The build archive could also be named $ID_$Version.tar.gz.

This would make it easier to differ the version. Would this work for the server?

hanzei commented 6 years ago

Thanks for the review! I understand that you want to keep things consistent. If we follow this thought we should use one file for both web and server e.g. manifest.js and manifest.go or two files for both web and server e.g. plugin_version.js and plugin_id.js and plugin_id. go and plugin_version.go.

I would rather go with one file per plugin part.

lieut-data commented 6 years ago

@Hanzei, I think a generated manifest.(js|go) probably makes a lot of sense!

hanzei commented 6 years ago

Thanks for the reviews. I addressed the feedback.

hanzei commented 6 years ago

I also change the makefile to include the plugins version, e.g. com.mattermost.sample-plugin_0.0.1.tar.gz

jwilander commented 6 years ago

@Hanzei would you mind copying these changes to https://github.com/mattermost/mattermost-plugin-demo as well?

hanzei commented 6 years ago

@jwilander sure, I can do this

hanzei commented 6 years ago

See https://github.com/mattermost/mattermost-plugin-demo/pull/6