Skip to content

Commit 90901c6

Browse files
committed
dep: record ego as tooling dependency
Reported at #198 (comment): > Took me a moment to uncover the problem but this appears to be a > different "ego" library. AuthN relies on go get > github.com/benbjohnson/ego instead. That used to be part of the > go.mod list until a recent PR. Add a tools.go to record the tooling dependency per guidance: https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module. This ensures ego sticks around when authn-server's dependencies are modified.
1 parent fcb46d7 commit 90901c6

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
*.db
22
.env
3-
vendor/
4-
dist/
53
.idea
4+
bin
5+
dist/
6+
vendor/

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@ NAME := $(ORG)/$(PROJECT)
55
VERSION := 1.15.0
66
MAIN := main.go
77

8+
BIN := $(shell pwd)/bin
9+
export GOBIN := $(BIN)
10+
export PATH := $(BIN):$(PATH)
11+
812
.PHONY: clean
913
clean:
1014
rm -rf dist
1115

12-
init:
16+
init: $(BIN)/ego
1317
go install
14-
ego server/views
18+
$(BIN)/ego server/views
1519

1620
# Run the server
1721
.PHONY: server
@@ -57,3 +61,6 @@ release:
5761
git tag v$(VERSION)
5862
git push --tags
5963
open https://github.com/$(NAME)/releases/tag/v$(VERSION)
64+
65+
$(BIN)/ego:
66+
go install github.com/benbjohnson/ego/...

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ go 1.13
55
require (
66
cloud.google.com/go v0.0.0-20180417120045-d19004dbbee5 // indirect
77
github.com/airbrake/gobrake v3.5.0+incompatible
8-
github.com/benbjohnson/ego v0.4.3 // indirect
8+
github.com/benbjohnson/ego v0.4.3
99
github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a // indirect
1010
github.com/dlclark/regexp2 v1.1.6 // indirect
1111
github.com/felixge/httpsnoop v1.0.0

tools.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
//go:build tools
2+
// +build tools
3+
4+
package tools
5+
6+
import (
7+
_ "github.com/benbjohnson/ego"
8+
)

0 commit comments

Comments
 (0)