Commit graph

58 commits

Author SHA1 Message Date
Ben Schumacher
2474dfc803
[MM-43713] Disable CGO for all builds (#167) 2022-10-07 20:40:37 +02:00
Ben Schumacher
0f9b8ba790
Only build binary for current architecture in dev mode (#161) 2022-01-17 13:15:25 +01:00
Carlos Tadeu Panato Junior
05c25c4c47
add linux arm64 targets (#160) 2021-11-02 14:45:37 +01:00
Jesse Hallam
f547011d23
add arm64 support (#155)
* add arm64 support

* arm64s arent exe...

* s/windows/darwin/
2021-06-16 09:38:16 -03:00
Ben Schumacher
ca9ee3c17c
[MM-33506] Use embed package to include plugin manifest (#145) 2021-05-18 15:51:24 +02:00
Artur M. Wolff
2dffc39e61
Skip the webapp/package.json if it is missing (#130) 2020-09-24 17:07:15 -04:00
Ben Schumacher
dcaf9dd289
Fix issues with Repository synchronization tool (#124)
* Only run tests in build/sync if directory exists

* Use t.Helper()

* Don't compare size of directories

* Fix TestFileHistory

* Fix linter issue

* Apply changes from https://github.com/mattermost/mattermost-plugin-github/pull/345

* Use ts file for tests

* Add sync target
2020-09-15 12:32:37 -04:00
Domas Monkus
0688e8df4c
MM-21722 - Repository synchronization tool (#86) 2020-09-13 15:30:09 +02:00
gubbins
5f6ebdfe74
Fix recursive copies in Makefile for OSX (#97)
Co-authored-by: Dave Gittins <david.gittins@imc.com>
2020-07-30 15:01:18 +02:00
Michael Kochell
ff87cdfc8f
Rename DEBUG env var to MM_DEBUG (#109) 2020-07-21 09:02:14 -03:00
Christopher Speller
7cdbf90a73
MM-26572 Improve tooling around typescript (#105)
* Upstream typescript tooling changes.

* Update rest of dependencies.
2020-07-09 10:51:28 -03:00
Jesse Hallam
a49d6f6dd4
Various tooling improvements from other plugins (#96) 2020-06-22 11:21:37 -04:00
Christopher Speller
ef0ac3babb
Fix makefile to npm install when package.json changes. (#94) 2020-04-28 10:43:35 -03:00
Ben Schumacher
f5e50c1e17
Integrate GolangCI-Lint (#90)
* Use plugin orb for ci

* Add golangci-lint config and fix issues

* Simplify circleci config

* Drop unparam

* Drop maligned

* Ignore varcheck in server/manifest.go
2020-04-02 15:01:00 -03:00
Ben Schumacher
ebbd3cdaad
Add test output files to make clean (#91) 2020-03-30 18:22:31 -04:00
Jesse Hallam
8e090661e8 make deploy reliable using Go (#74) 2019-11-20 23:16:23 +01:00
Nathan Mkaya
6a6bcd0084 Fix Issue #69 (#71)
Added check if token is empty raise an error
2019-11-07 11:04:44 +01:00
Ian Whitlock
49e8d0b875 Add debug-dist and debug-deploy build targets (#61)
* Add debug-dist and debug-deploy build targets

* Fix typos in documentation for new targets

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>
2019-08-28 09:53:15 -04:00
Yusuke Nemoto
d08a4c1ccc Add a task of webapp test (#51)
* Add a task of webapp test

* Flesh out tests

* Simplify test case

* Remove unnecessary dependency

* Fix style

* Add dependency

* Add trainling newline
2019-07-12 12:07:20 -04:00
Jesse Hallam
7399e616d6
avoid assuming $GOPATH is set (#55)
Assign `$GOPATH` if not set, and use same to get to `$GOPATH/bin` instead of assuming `$PATH` contains same.
2019-07-11 17:21:51 -03:00
Hanzei
43220fefbf
Make go flags customisable (#46) 2019-06-25 21:36:33 +02:00
Hanzei
5763d2f9f3 Add support for custom makefile (#45)
* Add support for custom makefile

* Add documention
2019-06-24 19:50:25 -04:00
Hanzei
43af4d9cfe
Refactoring (#43)
* Cleanup .gitignore

* Document minimum server version

* Become golint compliant

* Use pre defined http method

* Update dependencies

* Add i18n-extract target

* Add golint target

* Run check-style against all go files

Co-Authored-By: Jesse Hallam <jesse.hallam@gmail.com>
2019-06-22 16:15:48 +02:00
Hanzei
a79b47bf5b Fix make coverage (#40) 2019-05-28 22:05:07 -05:00
scott lee davis
0acb31f8a7 changed single expression plugin upload to validate responses (#36)
* changed single expression plugin upload to individual calls checking response.  fixes problems with no uploads on Ubuntu 16.04

* Updated error message as requested by @levb on #discussion_r275448965

* removed double PLUGIN_VERSION ref

* added  --post301 --location to curl invocation in ./build/bin/manifest apply
mkdir -p server/dist;
cd server && env GOOS=linux GOARCH=amd64 /usr/local/go/bin/go build -o dist/plugin-linux-amd64;
cd server && env GOOS=darwin GOARCH=amd64 /usr/local/go/bin/go build -o dist/plugin-darwin-amd64;
cd server && env GOOS=windows GOARCH=amd64 /usr/local/go/bin/go build -o dist/plugin-windows-amd64.exe;
cd webapp && /usr/local/bin/npm run build;

> webapp@0.0.1 build /home/skawtus/workspace/mattermost-plugin-sample/webapp
> webpack --mode=production

Hash: f6fcda45461a2f57b51b
Version: webpack 4.16.1
Time: 509ms
Built at: 2019-04-16 09:56:33
  Asset      Size  Chunks             Chunk Names
main.js  1.61 KiB       0  [emitted]  main
[0] multi ./src/index.js 28 bytes {0} [built]
[1] ./src/index.js 1.28 KiB {0} [built]
[2] ./src/manifest.js 174 bytes {0} [built]
rm -rf dist/
mkdir -p dist/com.mattermost.sample-plugin
cp plugin.json dist/com.mattermost.sample-plugin/
cp -r assets dist/com.mattermost.sample-plugin/
cp -r public/ dist/com.mattermost.sample-plugin/
mkdir -p dist/com.mattermost.sample-plugin/server/dist;
cp -r server/dist/* dist/com.mattermost.sample-plugin/server/dist/;
mkdir -p dist/com.mattermost.sample-plugin/webapp/dist;
cp -r webapp/dist/* dist/com.mattermost.sample-plugin/webapp/dist/;
cd dist && tar -cvzf com.mattermost.sample-plugin-0.1.0.tar.gz com.mattermost.sample-plugin
com.mattermost.sample-plugin/
com.mattermost.sample-plugin/webapp/
com.mattermost.sample-plugin/webapp/dist/
com.mattermost.sample-plugin/webapp/dist/main.js
com.mattermost.sample-plugin/assets/
com.mattermost.sample-plugin/assets/.gitkeep
com.mattermost.sample-plugin/plugin.json
com.mattermost.sample-plugin/server/
com.mattermost.sample-plugin/server/dist/
com.mattermost.sample-plugin/server/dist/plugin-darwin-amd64
com.mattermost.sample-plugin/server/dist/plugin-windows-amd64.exe
com.mattermost.sample-plugin/server/dist/plugin-linux-amd64
com.mattermost.sample-plugin/public/
com.mattermost.sample-plugin/public/hello.html
plugin built at: dist/com.mattermost.sample-plugin-0.1.0.tar.gz
Installing plugin via API
OK.

* reverted to original request sequence, combine with post301 & location flags to curl
2019-04-22 11:41:09 -04:00
Hanzei
fe3553d999 Go modules (#22)
* Move to go modules

* Move go.mod in root directory

* Update Readme

* Remove golang.org/x/tools from go.mod

* Remove go list from targets

* Set go version to 1.12

* Update Makefile

Co-Authored-By: hanzei <16541325+hanzei@users.noreply.github.com>

* Update dependencies

* Fix build
2019-04-10 12:42:33 -07:00
happygaijin
0e863452cc MM-14575: Automatically serve static files for plugins (#33)
* MM-14575: Automatically serve static files for plugins
* Added sample public file
* Added HAS_PUBLIC to Makefile to test for public folder
* Added "static_files" config setting

* MM-14575: Removing static_files from plugin.json

* MM14575: Moving public folder to bundle root

* MM14575:Moving public directory to root
2019-04-02 13:22:01 -07:00
Hanzei
cd8afb141d
Allow plugins to include assets in the bundle (#28) 2019-03-18 20:09:23 +01:00
Hanzei
81c67a92f3
Overwrite plugin when deploying (#32)
It's now a month after v5.8  has been released. Time to bring these changes back in.

Resubmission of https://github.com/mattermost/mattermost-plugin-sample/pull/23
2019-03-18 19:59:04 +01:00
Carlos Tadeu Panato Junior
cf8dcecdf2 introducing circleci (#31)
Based on the dev meeting we are moving to circleci
2019-03-06 19:03:52 +01:00
Hanzei
c415b6b7b8 Prohibit variable shadowing (#30) 2019-02-06 18:46:30 +01:00
Hanzei
ff7758dc6a
Add make coverage (#29)
This PR adds a 'make coverage` command, which creates a coverage report for the server code.
2019-01-23 20:53:49 +01:00
Yusuke Nemoto
c33bf64be0 Modify make help target for macOS (#27) 2019-01-09 16:30:14 +01:00
Lev
c347da882c
Revert "Overwrite plugin when deploying (#23)" (#25)
This reverts commit b64b9ec8ba.
2018-12-27 09:29:12 -08:00
Hanzei
b64b9ec8ba
Overwrite plugin when deploying (#23) 2018-12-17 20:53:30 +01:00
Hanzei
b303e8da00 Add make help target (#19)
* Add make help target

* Move documentation to previous line
2018-11-08 16:30:58 -05:00
Hanzei
f31f0f8a0a
Fix bug 2018-10-12 16:10:07 +02:00
Hanzei
1495c46ae6
Add govet target 2018-10-12 15:05:14 +02:00
Hanzei
0f51dc026e
Add make check-style to travis 2018-10-12 14:56:57 +02:00
Hanzei
fbdb357823
Add check-style makefile target 2018-10-12 13:38:18 +02:00
Hanzei
d0df44c109
Run go tests with -race & fix install 2018-09-23 08:18:07 +02:00
Jesse Hallam
5b2980d1ac
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
2018-09-20 11:56:40 -04:00
Hanzei
ed143d89d4
Include version into bundle name 2018-09-18 08:19:42 +02:00
Jesús Espino
376d9f5cd0 Adding curl as option to 'make deploy' for better linux support 2018-08-16 00:32:43 +02:00
cpanato
b6d0d55fac
fix the upload thru api 2018-08-15 13:35:02 +02:00
Christopher Speller
b66f4c7c1d
Remove unneeded env set 2018-07-31 22:45:45 -07:00
Jesse Hallam
debd9c11ed
pull changes from mattermost-plugin-demo 2018-07-31 16:21:03 -04:00
Jesse Hallam
2de3471aa2
more Makefile improvements
* warn upfront if go/dep/npm not available
* try to find dep in $GOPATH/bin if not installed globally
* only override variables if not externally defined, allowing manual override from command line
* split up Makefile into a buid/setup.mk for simplicity

I didn't actually find anything that made this Makefile not-linux
specific -- tested on Debian with the standard make installed.
2018-07-31 16:15:55 -04:00
Jesse Hallam
8788b41ab2
s/vgo/dep/ 2018-07-27 14:32:36 -04:00
Jesse Hallam
f387133c21
Makefile: webapp test should depend on npm install 2018-07-26 15:25:04 -04:00