Add a Makefile with a few targets. The default is 'build'. The build

target calls the new version-at-commit.sh script which will
automatically populate the version variable inside the Headscale binary.

Once we start tagging releases on the git tree, that will come in handy.

The Makefile also has a 'test' target (does nothing yet, no tests yet)
and a 'dev' target, which runs linters, tests, and finally builds.
This commit is contained in:
Ward Vandewege 2021-04-25 10:21:04 -04:00
parent 6fa84004b3
commit 6aedc1111b
4 changed files with 67 additions and 4 deletions

View file

@ -42,17 +42,17 @@ Suggestions/PRs welcomed!
1. Compile the headscale binary
```shell
go build cmd/headscale/headscale.go
make
```
2. Get youself a PostgreSQL DB running (yes, [I know](https://tailscale.com/blog/an-unlikely-database-migration/))
2. Get yourself a PostgreSQL DB running (yes, [I know](https://tailscale.com/blog/an-unlikely-database-migration/))
```shell
docker run --name headscale -e POSTGRES_DB=headscale -e \
POSTGRES_USER=foo -e POSTGRES_PASSWORD=bar -p 5432:5432 -d postgres
```
3. Sort some stuff up (headscale Wireguard keys & the config.json file)
3. Set some stuff up (headscale Wireguard keys & the config.json file)
```shell
wg genkey > private.key
wg pubkey < private.key > public.key # not needed