* feat: directory-scoped cheatpaths

`cheat` now searches for a `.cheat` directory in the current working
directory. If found, that directory is (temporarily) appended to the slice
of cheatpaths.

* makefile wip

* fix: appeases linter

Appeases linter (`go vet`) by adding quotation marks to YAML struct
tags.

* chore: modifies .gitignore

Adds `tag` to `.gitignore`

* feat: adds Makefile

Adds a `Makefile` for managing build-related tasks.

* chore: documents directory-local paths

Adds documentation regarding the new directory-local cheatpath
functionality.

* chore: updates dependencies

* chore: bumps version to 3.3.0

* chore: updates bin scripts

- Removes `build_release.sh`
- Places deprecation notice in `build_devel.sh`, as its purpose has been
  superceded by the `Makefile`.
This commit is contained in:
Chris Allen Lane
2020-01-20 12:34:48 -05:00
committed by GitHub
parent 815e714fb4
commit 91f0d02de2
24 changed files with 560 additions and 120 deletions

View File

@ -1,16 +1,15 @@
#!/bin/bash
# TODO: this script has been made obsolete by the Makefile, yet downstream
# package managers plausibly rely on it for compiling locally. Remove this file
# after downstream maintainers have had time to modify their packages to simply
# invoke `make` in the project root.
# 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"
cd $APPDIR
# display a build checksum
md5sum "$APPDIR/dist/cheat"
make

View File

@ -1,36 +0,0 @@
#!/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
# build embeds
cd "$APPDIR/cmd/cheat"
go clean && go generate
# amd64/darwin
env GOOS=darwin GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-darwin-amd64" "$APPDIR/cmd/cheat"
# amd64/linux
env GOOS=linux GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-linux-amd64" "$APPDIR/cmd/cheat"
# amd64/windows
env GOOS=windows GOARCH=amd64 go build -mod vendor -o \
"$APPDIR/dist/cheat-win-amd64.exe" "$APPDIR/cmd/cheat"
# arm7/linux
env GOOS=linux GOARCH=arm GOARM=7 go build -mod vendor -o \
"$APPDIR/dist/cheat-linux-arm7" "$APPDIR/cmd/cheat"
# arm6/linux
env GOOS=linux GOARCH=arm GOARM=6 go build -mod vendor -o \
"$APPDIR/dist/cheat-linux-arm6" "$APPDIR/cmd/cheat"
# arm5/linux
env GOOS=linux GOARCH=arm GOARM=5 go build -mod vendor -o \
"$APPDIR/dist/cheat-linux-arm5" "$APPDIR/cmd/cheat"