Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
Automate running packr in build process
Browse files Browse the repository at this point in the history
  • Loading branch information
errm committed Aug 28, 2018
1 parent 628e9c0 commit 1aa22ef
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ main
dist/
.travis/ekstrap.asc
coverage.txt
**/*-packr.go
1 change: 1 addition & 0 deletions .travis/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ set -euo pipefail
openssl aes-256-cbc -K $encrypted_189aefeda93d_key -iv $encrypted_189aefeda93d_iv -in .travis/ekstrap.asc.enc -out .travis/ekstrap.asc -d
gpg --import .travis/ekstrap.asc
make install-linter
go get -u github.com/gobuffalo/packr/...
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ GOMETALINTER = gometalinter ./...
GORELEASER = goreleaser release --rm-dist --debug

all: test lint $(BINARY_NAME)
$(BINARY_NAME):
$(BINARY_NAME): generate
$(GOBUILD) -o $(BINARY_NAME) -v
compress: $(BINARY_NAME)
$(UPX) $(BINARY_NAME)
Expand All @@ -20,13 +20,14 @@ install-linter:
$(GOMETALINTER) --install
lint:
$(GOMETALINTER)
release: .goreleaser.yml
release: generate .goreleaser.yml
$(GORELEASER)
snapshot: .goreleaser.yml
$(GORELEASER) --snapshot
install: $(BINARY_NAME)
install -m755 $(BINARY_NAME) /usr/sbin

generate:
$(GOCMD) generate
clean:
rm -rf \
./$(BINARY_NAME) \
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ limitations under the License.

package main

//go:generate packr

import (
"log"

Expand Down

0 comments on commit 1aa22ef

Please sign in to comment.