tweak plugin id/version injection

* define BUNDLE_NAME after including build/setup.mk (just for clarity, not correctness)
* separate plugin id from version with dash in bundle name to match Mattermost package
* fix various js/go idioms (some pre-existing!)
* fix error message
This commit is contained in:
Jesse Hallam 2018-09-20 11:36:53 -04:00
parent a0e9acdbaf
commit 5b2980d1ac
No known key found for this signature in database
GPG key ID: E7959EB6518AF966
6 changed files with 28 additions and 17 deletions

View file

@ -4,11 +4,12 @@ NPM ?= $(shell command -v npm 2> /dev/null)
HTTP ?= $(shell command -v http 2> /dev/null)
CURL ?= $(shell command -v curl 2> /dev/null)
MANIFEST_FILE ?= plugin.json
BUNDLE_NAME = $(PLUGIN_ID)_$(PLUGIN_VERSION).tar.gz
# Verify environment, and define PLUGIN_ID, HAS_SERVER and HAS_WEBAPP as needed.
# Verify environment, and define PLUGIN_ID, PLUGIN_VERSION, HAS_SERVER and HAS_WEBAPP as needed.
include build/setup.mk
BUNDLE_NAME ?= $(PLUGIN_ID)-$(PLUGIN_VERSION).tar.gz
# all, the default target, tests, builds and bundles the plugin.
all: test dist