mirror of
https://github.com/cheat/cheat.git
synced 2024-11-25 15:31:36 +01:00
27a4991a3a
Build scripts now invoke `go mod vendor` and `go mod tidy` early in the build process, to ensure that the `vendor` directory stays consistent with the `go.mod` et. al.
17 lines
407 B
Bash
Executable File
17 lines
407 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# locate the cheat project root
|
|
BINDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
APPDIR=$(readlink -f "$BINDIR/..")
|
|
|
|
# update the vendored dependencies
|
|
go mod vendor && go mod tidy
|
|
|
|
# compile the executable
|
|
cd "$APPDIR/cmd/cheat"
|
|
go clean && go generate && go build -mod vendor
|
|
mv "$APPDIR/cmd/cheat/cheat" "$APPDIR/dist/cheat"
|
|
|
|
# display a build checksum
|
|
md5sum "$APPDIR/dist/cheat"
|