bundle the plugin with the plugin_id in the tar

This fits our existing practice of distributing plugins, and enables
easier manual installation of same.
This commit is contained in:
Jesse Hallam 2018-07-25 14:22:42 -04:00
parent 8f5c9eadf6
commit 68cf434afb
No known key found for this signature in database
GPG key ID: E7959EB6518AF966

View file

@ -69,7 +69,7 @@ ifneq ($(HAS_WEBAPP),)
mkdir -p dist/$(PLUGIN_ID)/webapp/dist; mkdir -p dist/$(PLUGIN_ID)/webapp/dist;
cp -r webapp/dist/* dist/$(PLUGIN_ID)/webapp/dist/; cp -r webapp/dist/* dist/$(PLUGIN_ID)/webapp/dist/;
endif endif
cd dist/$(PLUGIN_ID) && tar -zcvf ../$(PLUGIN_ID).tar.gz * cd dist && tar -cvzf $(PLUGIN_ID).tar.gz $(PLUGIN_ID)
@echo plugin built at: dist/$(PLUGIN_ID).tar.gz @echo plugin built at: dist/$(PLUGIN_ID).tar.gz
@ -95,8 +95,8 @@ ifneq ($(and $(MM_SERVICESETTINGS_SITEURL),$(MM_ADMIN_USERNAME),$(MM_ADMIN_PASSW
http --print b POST $(MM_SERVICESETTINGS_SITEURL)/api/v4/plugins/$(PLUGIN_ID)/enable http --print b POST $(MM_SERVICESETTINGS_SITEURL)/api/v4/plugins/$(PLUGIN_ID)/enable
else ifneq ($(wildcard ../mattermost-server/.*),) else ifneq ($(wildcard ../mattermost-server/.*),)
@echo "Installing plugin via filesystem. Server restart and manual plugin enabling required" @echo "Installing plugin via filesystem. Server restart and manual plugin enabling required"
mkdir -p ../mattermost-server/plugins/$(PLUGIN_ID) mkdir -p ../mattermost-server/plugins
tar -C ../mattermost-server/plugins/$(PLUGIN_ID) -zxvf dist/$(PLUGIN_ID).tar.gz tar -C ../mattermost-server/plugins -zxvf dist/$(PLUGIN_ID).tar.gz
else else
@echo "No supported deployment method available. Install plugin manually." @echo "No supported deployment method available. Install plugin manually."
endif endif