mattermost / mattermost-plugin-starter-template

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

Fix recursive copies in Makefile for OSX #97

Closed grubbins closed 4 years ago

grubbins commented 4 years ago

Summary

Fixes incorrect location of public files when building.

mattermod commented 4 years ago

The file Makefile is in the blacklist and should not be modified from external contributors, please if you are part of the Mattermost Org submit this PR in the upstream. /cc @mattermost/core-security @mattermost/core-build-engineers

mattermod commented 4 years ago

The file Makefile is in the blocklist and should not be modified from external contributors, please if you are part of the Mattermost Org submit this PR in the upstream. /cc @mattermost/core-security @mattermost/core-build-engineers

grubbins commented 4 years ago

@hanzei I replaced all the recursive copies with the cp -r <src>/* <dest> style so they're consistent and they will work on OSX and Linux.

mattermod commented 4 years ago

The file Makefile is in the blocklist and should not be modified from external contributors, please if you are part of the Mattermost Org submit this PR in the upstream. /cc @mattermost/core-security @mattermost/core-build-engineers

grubbins commented 4 years ago

OK, tested this version on both OSX and Linux with same result:

> tree -a dist/
dist/
├── com.mattermost.plugin-starter-template
│   ├── assets
│   │   └── .gitkeep
│   ├── plugin.json
│   ├── public
│   │   └── hello.html
│   ├── server
│   │   └── dist
│   │       ├── plugin-darwin-amd64
│   │       ├── plugin-linux-amd64
│   │       └── plugin-windows-amd64.exe
│   └── webapp
│       └── dist
│           └── main.js
└── com.mattermost.plugin-starter-template-0.1.0.tar.gz

I also checked behaviour if public or $ASSETS_DIR are empty or entirely missing - all seems to work as expected.