diff --git a/Makefile b/Makefile index 9c3f70c..4598d52 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,9 @@ bundle: ifneq ($(wildcard $(ASSETS_DIR)/.),) cp -r $(ASSETS_DIR) dist/$(PLUGIN_ID)/ endif +ifneq ($(HAS_PUBLIC),) + cp -r public/ dist/$(PLUGIN_ID)/ +endif ifneq ($(HAS_SERVER),) mkdir -p dist/$(PLUGIN_ID)/server/dist; cp -r server/dist/* dist/$(PLUGIN_ID)/server/dist/; diff --git a/build/setup.mk b/build/setup.mk index 90fb163..b3c93a9 100644 --- a/build/setup.mk +++ b/build/setup.mk @@ -25,6 +25,9 @@ HAS_SERVER ?= $(shell build/bin/manifest has_server) # Determine if a webapp is defined in the manifest. HAS_WEBAPP ?= $(shell build/bin/manifest has_webapp) +# Determine if a /public folder is in use +HAS_PUBLIC ?= $(wildcard public/.) + # Try looking for dep in $(GOPATH) in case $(GOPATH)/bin isn't in $(PATH). GOPATH ?= $(shell $(GO) env GOPATH) ifeq ($(DEP),) diff --git a/public/hello.html b/public/hello.html new file mode 100644 index 0000000..9bd0807 --- /dev/null +++ b/public/hello.html @@ -0,0 +1 @@ +Hello from the static files public folder for the com.mattermost.sample-plugin plugin! \ No newline at end of file