Skip to content

Commit a285888

Browse files
authored
run packr (#8)
run packr
1 parent 60e90b2 commit a285888

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.goreleaser.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ builds:
2727
- amd64
2828
- arm
2929
- arm64
30+
before:
31+
hooks:
32+
- make install_packr packr
3033
archives:
3134
- replacements:
3235
darwin: Darwin

Makefile

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export GOPATH ?= $(shell go env GOPATH)
22
export GO111MODULE ?= on
3-
3+
GOBASE=$(shell pwd)
4+
export GOBIN=$(GOBASE)/bin
45
BIN_DIR = bin
56
APPNAME = app
67
LDFLAGS ?=
@@ -18,18 +19,29 @@ mod:
1819
clean: ## run all cleanup tasks
1920
go clean ./...
2021
rm -rf $(BIN_DIR)
22+
cd cmd/go-runner && packr2 clean
23+
cd cmd/go-test-parser && packr2 clean
2124

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

28+
install_packr: ## install packr2
29+
go install github.com/gobuffalo/packr/v2/packr2
30+
2531
.PHONY: install_deps
26-
install_deps: golangci ## install necessary dependencies
32+
install_deps: golangci install_packr ## install necessary dependencies
2733

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

39+
.PHONY: packr
40+
packr: ##
41+
cd cmd/go-runner && $(GOBIN)/packr2
42+
cd cmd/go-test-parser && $(GOBIN)/packr2
43+
44+
3345
.PHONY: unit
3446
unit: ## run unit tests
3547
go test -v ./... -count 10 -race

0 commit comments

Comments
 (0)