Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Adding a checksum value and commenting out windows build since it is … (
Browse files Browse the repository at this point in the history
#114)

* Adding a checksum value and commenting out windows build since it is failing atm

* Adding windows commands back after PR 115

* Forgot to rename the windows archive for generating the md5

* Adding requires parameter for the test job with tagges builds

* Adding golangci install to the build for tagged builds

* install-golangci-lint command needs to be part of a step

* Change the steps for build to call lint job

* Adding presistence for the govet step

* Updating path for presistence of govet

* Adding govet install to the build job

* Need to attach to the workspace

* add working directory

* Adding checkout step back

* Remove attach statement

* Add call to install golangci-lint again

* Update GHR command options

* Update presistence to grab the entire build dir

* Debug circleci env

* Upload everything in the build dir and remove debug info

Co-authored-by: mattermod <[email protected]>
  • Loading branch information
jaydeland and mattermod authored Jan 29, 2020
1 parent a5310b9 commit e24eda3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
14 changes: 10 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,17 @@ jobs:
name: default
steps:
- checkout
- run:
name: "Validate lint"
command: |
echo "Installing mattermost-govet"
GO111MODULE=off go get -u github.com/mattermost/mattermost-govet
- install-golangci-lint
- run: make package
- persist_to_workspace:
root: .
paths:
- ./build/*.tar.gz
- ./build/*.zip
- build

publish-github-release:
docker:
Expand All @@ -181,8 +186,7 @@ jobs:
- run:
name: "Publish Release on GitHub"
command: |
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./build/*.tar.gz
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} ./build/*.zip
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete ${CIRCLE_TAG} build
workflows:
version: 2
Expand Down Expand Up @@ -215,6 +219,8 @@ workflows:
branches:
ignore: /.*/
- test:
requires:
- setup
filters:
tags:
only: /^v.*/
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
GO_PACKAGES=$(shell go list ./...)
GO ?= $(shell command -v go 2> /dev/null)
BUILD_HASH ?= $(shell git rev-parse HEAD)
BUILD_VERSION ?= $(shell git ls-remote --tags --refs --sort="v:refname" git://github.com/mattermost/mmctl | tail -n1 | sed 's/.*\///')
BUILD_VERSION ?= $(shell git ls-remote --tags --refs git://github.com/mattermost/mmctl | tail -n1 | sed 's/.*\///')
# Needed to avoid install shadow in brew which is not permitted
ADVANCED_VET ?= TRUE

Expand All @@ -13,6 +13,7 @@ all: build

build: vendor check
go build -ldflags '$(LDFLAGS)' -mod=vendor
md5sum < mmctl | cut -d ' ' -f 1 > mmctl.md5.txt

install: vendor check
go install -ldflags '$(LDFLAGS)' -mod=vendor
Expand All @@ -23,14 +24,17 @@ package: vendor check
@echo Build Linux amd64
env GOOS=linux GOARCH=amd64 go build -mod=vendor
tar cf build/linux_amd64.tar mmctl
md5sum < build/linux_amd64.tar | cut -d ' ' -f 1 > build/linux_amd64.tar.md5.txt

@echo Build OSX amd64
env GOOS=darwin GOARCH=amd64 go build -mod=vendor
tar cf build/darwin_amd64.tar mmctl
md5sum < build/darwin_amd64.tar | cut -d ' ' -f 1 > build/darwin_amd64.tar.md5.txt

@echo Build Windows amd64
env GOOS=windows GOARCH=amd64 go build -mod=vendor
zip build/windows_amd64.zip mmctl.exe
md5sum < build/windows_amd64.zip | cut -d ' ' -f 1 > build/windows_amd64.zip.md5.txt

rm mmctl mmctl.exe

Expand Down

0 comments on commit e24eda3

Please sign in to comment.