The following is a quickstart guide for developing cheat.
Before you begin, you must install a handful of system dependencies. The
following are required, and must be available on your PATH:
gitgo(>= 1.17 is recommended)make
The following dependencies are optional:
dockerpandoc(necessary to generate amanpage)
Run make setup to install scc and revive, which are used by various
make targets.
After your environment has been configured, your development workflow will resemble the following:
- Make changes to the
cheatsource code. - Run
make testto run unit-tests. - Fix compiler errors and failing tests as necessary.
- Run
make. Acheatexecutable will be written to thedistdirectory. - Use the new executable by running
dist/cheat <command>. - Run
make installto installcheatto yourPATH. - Run
make build-releaseto build cross-platform binaries indist. - Run
make cleanto clean thedistdirectory when desired.
You may run make help to see a list of available make commands.
It may be useful to test your changes within a pristine environment. An Alpine-based docker container has been provided for that purpose.
If you would like to build the docker container, run:
make docker-setupTo shell into the container, run:
make docker-shThe cheat source code will be mounted at /app within the container.
If you would like to destroy this container, you may run:
make distclean