Skip to content

Commit

Permalink
Merge pull request #16 from tnir/go-111-modules
Browse files Browse the repository at this point in the history
Migrate from dep to Modules
  • Loading branch information
William B Ernest authored Aug 22, 2019
2 parents 5021ced + 277d76f commit 0c47681
Show file tree
Hide file tree
Showing 2,356 changed files with 172 additions and 1,309,412 deletions.
30 changes: 5 additions & 25 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,10 @@
version: 2.1
jobs:
lint:
docker:
- image: circleci/golang:1.12-node

working_directory: /go/src/github.com/mattermost/mattermost-plugin-sample
steps:
- checkout

- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- run: make check-style

test:
docker:
- image: circleci/golang:1.12-node

working_directory: /go/src/github.com/mattermost/mattermost-plugin-sample
steps:
- checkout

- run: curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- run: make test
orbs:
plugin-ci: mattermost/plugin-ci@0.0.5

workflows:
version: 2
untagged-build:
ci-build:
jobs:
- lint
- test
- plugin-ci/lint
- plugin-ci/test
30 changes: 11 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GO ?= $(shell command -v go 2> /dev/null)
DEP ?= $(shell command -v dep 2> /dev/null)
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
GOPATH ?= $(shell go env GOPATH)

# You can include assets this directory into the bundle. This can be e.g. used to include profile pictures.
ASSETS_DIR ?= assets
Expand All @@ -23,7 +23,7 @@ apply:

## Runs govet and gofmt against all packages.
.PHONY: check-style
check-style: server/.depensure webapp/.npminstall gofmt govet
check-style: webapp/.npminstall gofmt govet
@echo Checking for style guide compliance

ifneq ($(HAS_WEBAPP),)
Expand Down Expand Up @@ -55,22 +55,15 @@ endif
govet:
ifneq ($(HAS_SERVER),)
@echo Running govet
$(GO) get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
$(GO) vet $$(go list ./server/...)
$(GO) vet -vettool=$(GOPATH)/bin/shadow $$(go list ./server/...)
env GO111MODULE=off $(GO) get golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow
$(GO) vet ./...
$(GO) vet -vettool=$(GOPATH)/bin/shadow ./...
@echo Govet success
endif

## Ensures the server dependencies are installed.
server/.depensure:
ifneq ($(HAS_SERVER),)
cd server && $(DEP) ensure
touch $@
endif

## Builds the server, if it exists, including support for multiple architectures.
.PHONY: server
server: server/.depensure
server:
ifneq ($(HAS_SERVER),)
mkdir -p server/dist;
cd server && env GOOS=linux GOARCH=amd64 $(GO) build -o dist/plugin-linux-amd64;
Expand Down Expand Up @@ -148,20 +141,20 @@ endif

## Runs any lints and unit tests defined for the server and webapp, if they exist.
.PHONY: test
test: server/.depensure webapp/.npminstall
test: webapp/.npminstall
ifneq ($(HAS_SERVER),)
cd server && $(GO) test -race -v ./...
$(GO) test -race -v ./server/...
endif
ifneq ($(HAS_WEBAPP),)
cd webapp && $(NPM) run fix;
endif

## Creates a coverage report for the server code.
.PHONY: coverage
coverage: server/.depensure webapp/.npminstall
coverage: webapp/.npminstall
ifneq ($(HAS_SERVER),)
cd server && $(GO) test -race -coverprofile=coverage.txt ./...
@cd server && $(GO) tool cover -html=coverage.txt
$(GO) test -race -coverprofile=server/coverage.txt ./server/...
$(GO) tool cover -html=server/coverage.txt
endif

## Clean removes all build artifacts.
Expand All @@ -170,7 +163,6 @@ clean:
rm -fr dist/
ifneq ($(HAS_SERVER),)
rm -fr server/dist
rm -fr server/.depensure
endif
ifneq ($(HAS_WEBAPP),)
rm -fr webapp/.npminstall
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RSSFeed Plugin ![CircleCI branch](https://img.shields.io/circleci/project/github/mattermost/mattermost-plugin-sample/master.svg)
# RSSFeed Plugin ![CircleCI branch](https://img.shields.io/circleci/project/github/wbernest/mattermost-plugin-rssfeed/master.svg)

This plugin allows a user to subscribe a channel to an RSS (Version 2 only) or an Atom Feed.

Expand Down
136 changes: 0 additions & 136 deletions build/manifest/Gopkg.lock

This file was deleted.

11 changes: 0 additions & 11 deletions build/manifest/Gopkg.toml

This file was deleted.

19 changes: 19 additions & 0 deletions build/manifest/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module github.com/wbernest/mattermost-plugin-rssfeed

go 1.12

require (
github.com/blang/semver v3.5.1+incompatible
github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da
github.com/mattermost/mattermost-server v5.6.0+incompatible
github.com/nicksnyder/go-i18n v1.10.0
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c
github.com/pelletier/go-toml v1.2.0
github.com/pkg/errors v0.8.0
go.uber.org/atomic v1.3.2
go.uber.org/multierr v1.1.0
go.uber.org/zap v1.9.0
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3
gopkg.in/yaml.v2 v2.2.1
)
27 changes: 27 additions & 0 deletions build/manifest/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ=
github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk=
github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da h1:b5fma7aUP2fn6+tdKKCJ0TxXYzY/5wDiqUxNdyi5VF4=
github.com/gorilla/websocket v0.0.0-20180605202552-5ed622c449da/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
github.com/mattermost/mattermost-server v5.6.0+incompatible h1:VldG5KLS+G3XJK4jf6j+Ln6qtcYQry0XmlUvqhrotD8=
github.com/mattermost/mattermost-server v5.6.0+incompatible/go.mod h1:5L6MjAec+XXQwMIt791Ganu45GKsSiM+I0tLR9wUj8Y=
github.com/nicksnyder/go-i18n v1.10.0 h1:5AzlPKvXBH4qBzmZ09Ua9Gipyruv6uApMcrNZdo96+Q=
github.com/nicksnyder/go-i18n v1.10.0/go.mod h1:HrK7VCrbOvQoUAQ7Vpy7i87N7JZZZ7R2xBGjv0j365Q=
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c h1:MUyE44mTvnI5A0xrxIxaMqoWFzPfQvtE2IWUollMDMs=
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c/go.mod h1:VyrYX9gd7irzKovcSS6BIIEwPRkP2Wm2m9ufcdFSJ34=
github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc=
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
github.com/pkg/errors v0.8.0 h1:WdK/asTD0HN+q6hsWO3/vpuAkAr+tw6aNJNDFFf0+qw=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
go.uber.org/atomic v1.3.2 h1:2Oa65PReHzfn29GpvgsYwloV9AVFHPDk8tYxt2c2tr4=
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0 h1:HoEmRHQPVSqub6w2z2d2EOVs2fjyFRGyofhKuyDq0QI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.9.0 h1:WciNIN5xKjsLnAkg/+UngCXim8pdyhP/4QwycrDzQlQ=
go.uber.org/zap v1.9.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb h1:Ah9YqXLj6fEgeKqcmBuLCbAsrF3ScD7dJ/bYM0C6tXI=
golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3 h1:AFxeG48hTWHhDTQDk/m2gorfVHUEa9vo3tp3D7TzwjI=
gopkg.in/natefinch/lumberjack.v2 v2.0.0-20170531160350-a96e63847dc3/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k=
gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
21 changes: 0 additions & 21 deletions build/manifest/vendor/github.com/blang/semver/.travis.yml

This file was deleted.

22 changes: 0 additions & 22 deletions build/manifest/vendor/github.com/blang/semver/LICENSE

This file was deleted.

Loading

0 comments on commit 0c47681

Please sign in to comment.