magic incantations to build with go modules

This commit is contained in:
Ted Unangst 2019-04-10 08:51:56 -04:00
parent 3a9c28df3f
commit af7f00baf2
4 changed files with 37 additions and 11 deletions

View File

@ -2,7 +2,7 @@
all: honk all: honk
honk: *.go honk: *.go
go build -o honk go build -mod=`ls -d vendor 2> /dev/null` -o honk
clean: clean:
rm -f honk rm -f honk

24
README
View File

@ -14,20 +14,23 @@ The button to submit a new honk says "it's gonna be honked".
Ein Honk is a stupid person auf deutsch. Ein Honk is a stupid person auf deutsch.
-- requirements -- build
github.com/gorilla/mux It should be sufficient to type make after unpacking a release.
golang.org/x/crypto You'll need a go compiler version 1.11 or later.
golang.org/x/net
golang.org/x/text
humungus.tedunangst.com/r/go-sqlite3
It should be sufficient to type make after unpacking a release under go/src.
Mind your gopath.
Even on a fast machine, building from source can take several seconds. Even on a fast machine, building from source can take several seconds.
Busy honk instances may require megabytes of memory. -- requirements
libsqlite3 (you probably already have it)
go modules included in vendor:
github.com/gorilla/mux
golang.org/x/crypto
golang.org/x/net
golang.org/x/sys
humungus.tedunangst.com/r/go-sqlite3
-- setup -- setup
@ -47,3 +50,4 @@ Then run honk.
./honk ./honk
Busy honk instances may use megabytes of memory.

9
go.mod Normal file
View File

@ -0,0 +1,9 @@
module humungus.tedunangst.com/r/honk
require (
github.com/gorilla/mux v1.7.1
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e
humungus.tedunangst.com/r/go-sqlite3 v1.1.2
)

13
go.sum Normal file
View File

@ -0,0 +1,13 @@
github.com/gorilla/mux v1.7.1 h1:Dw4jY2nghMMRsh1ol8dv1axHkDwMQK2DHerMNJsIpJU=
github.com/gorilla/mux v1.7.1/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5 h1:bselrhR0Or1vomJZC8ZIjWtbDmn9OYFLX5Ik9alpJpE=
golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e h1:nFYrTHrdrAOpShe27kaFHjsqYSEQ0KWqdWLu3xuZJts=
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
humungus.tedunangst.com/r/go-sqlite3 v1.1.2 h1:bRAXNRZ4VNFRFhhG4tdudK4Lv4ktHQAHEppKlDANUFg=
humungus.tedunangst.com/r/go-sqlite3 v1.1.2/go.mod h1:FtEEmQM7U2Ey1TuEEOyY1BmphTZnmiEjPsNLEAkpf/M=