Skip to content

Commit

Permalink
run packr (#8)
Browse files Browse the repository at this point in the history
run packr
  • Loading branch information
Tsovak authored Oct 6, 2020
1 parent 60e90b2 commit a285888
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ builds:
- amd64
- arm
- arm64
before:
hooks:
- make install_packr packr
archives:
- replacements:
darwin: Darwin
Expand Down
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export GOPATH ?= $(shell go env GOPATH)
export GO111MODULE ?= on

GOBASE=$(shell pwd)
export GOBIN=$(GOBASE)/bin
BIN_DIR = bin
APPNAME = app
LDFLAGS ?=
Expand All @@ -18,18 +19,29 @@ mod:
clean: ## run all cleanup tasks
go clean ./...
rm -rf $(BIN_DIR)
cd cmd/go-runner && packr2 clean
cd cmd/go-test-parser && packr2 clean

golangci: ## install golangci-linter
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ${BIN_DIR} v1.21.0

install_packr: ## install packr2
go install github.com/gobuffalo/packr/v2/packr2

.PHONY: install_deps
install_deps: golangci ## install necessary dependencies
install_deps: golangci install_packr ## install necessary dependencies

.PHONY: build
build: ## build all applications
go build -ldflags "$(LDFLAGS)" -o $(BIN_DIR)/go-test-parser cmd/go-test-parser/*.go
go build -ldflags "$(LDFLAGS)" -o $(BIN_DIR)/go-runner cmd/go-runner/*.go

.PHONY: packr
packr: ##
cd cmd/go-runner && $(GOBIN)/packr2
cd cmd/go-test-parser && $(GOBIN)/packr2


.PHONY: unit
unit: ## run unit tests
go test -v ./... -count 10 -race
Expand Down

0 comments on commit a285888

Please sign in to comment.