Skip to content

Commit

Permalink
Add a make command for github release
Browse files Browse the repository at this point in the history
  • Loading branch information
chetanyakan committed Dec 18, 2018
1 parent e1dccba commit ae10035
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ GOOS=$(shell uname -s | tr '[:upper:]' '[:lower:]')
GOPATH ?= $(GOPATH:)

PLUGINNAME=boilerplate
PLUGINVERSION=$(shell echo `cat plugin.json | grep -Po '"'"version"'"\s*:\s*"\K([^"]*)'`)
PACKAGENAME=mattermost-plugin-$(PLUGINNAME)-v$(PLUGINVERSION)
PLUGINVERSION=v$(shell echo `cat plugin.json | grep -Po '"'"version"'"\s*:\s*"\K([^"]*)'`)
PACKAGENAME=mattermost-plugin-$(PLUGINNAME)-$(PLUGINVERSION)
BLACK=`tput setaf 0`
RED=`tput setaf 1`
Expand All @@ -20,10 +20,17 @@ BOLD=`tput bold`
INVERSE=`tput rev`
RESET=`tput sgr0`
.PHONY: default test clean check-style checkjs checkgo govet golint gofmt .distclean dist fix fixjs fixgo
.PHONY: default test clean check-style checkjs checkgo govet golint gofmt .distclean dist fix fixjs fixgo github-release
default: check-style test dist
github-release:
@if [ $$(git status --porcelain | wc -l) != "0" -o $$(git rev-list HEAD@{upstream}..HEAD | wc -l) != "0" ]; \
then echo ${RED}"local repo is not clean"${RESET}; exit 1; fi;
@echo ${BOLD}"Creating a tag to trigger circleci github release\n"${RESET}
git tag $(PLUGINVERSION)
git push origin $(PLUGINVERSION)
check-style: .npminstall vendor
@echo ${BOLD}"Checking for style guide compliance\n"${RESET}
@make checkjs
Expand Down

0 comments on commit ae10035

Please sign in to comment.