vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Name one vole on PATH instead of a checkout-local ./vole
0d8a8c55a8fa7b31abc0c17c2e60b3011ac797f2 · Keenan Nemetz · 13d ago · parent 1b1571bb
Name one vole on PATH instead of a checkout-local ./vole Contributor docs told readers to build ./vole into the checkout and run it by relative path. That left two copies of the same program in play: the one just built and the installed one used for forge operations. Nothing could tell them apart, because a source build and a release build printed the same version. A build from the source tree now prints <version>-devel+<revision>, with .dirty when the checkout has uncommitted changes, while a release build still prints the tag it was stamped with. The docs install with go install and invoke vole from PATH, so there is one binary and it says which build it is. Refs 01M7XF41G1R951ASJGKGDGM0CE.
DEVELOPMENT.md +24−13
| @@ -23,21 +23,32 @@ The resulting binary needs `libsqlite3.so.0` on the machine that runs it. | |||
| 23 | 23 | ||
| 24 | 24 | ## Build Vole | |
| 25 | 25 | ||
| 26 | Clone the repository, then build from its root: | ||
| 26 | Install the binary; do not keep a second copy in the checkout. One `vole` on your | ||
| 27 | `PATH` serves both development and forge operations, and `vole version` says | ||
| 28 | which build it is. | ||
| 29 | |||
| 30 | Clone the repository, then install it from its root: | ||
| 27 | 31 | ||
| 28 | 32 | ```sh | |
| 29 | 33 | git clone <repository-url> | |
| 30 | 34 | cd vole | |
| 31 | go build -tags libsqlite3,sqlite_fts5 -o vole ./cmd/vole | ||
| 32 | ./vole version | ||
| 35 | go install -tags libsqlite3,sqlite_fts5 ./cmd/vole | ||
| 36 | vole version | ||
| 33 | 37 | ``` | |
| 34 | 38 | ||
| 35 | A source build without version linker flags prints: | ||
| 39 | `go install` writes to `$(go env GOPATH)/bin`, so put that directory on your | ||
| 40 | `PATH` if it is not there already. A build from the source tree prints the | ||
| 41 | version of the last release with the revision it was built from: | ||
| 36 | 42 | ||
| 37 | 43 | ```text | |
| 38 | 0.2.0 | ||
| 44 | 0.2.0-devel+4f8a3da | ||
| 39 | 45 | ``` | |
| 40 | 46 | ||
| 47 | A package or release build prints only the tag it was stamped with, so the | ||
| 48 | output tells you whether the command you are running is the build from this | ||
| 49 | checkout or an installed release. `4f8a3da.dirty` marks a build from a checkout | ||
| 50 | with uncommitted changes. Re-run `go install` after changing code. | ||
| 51 | |||
| 41 | 52 | The `libsqlite3` tag links the system SQLite library instead of the driver's | |
| 42 | 53 | bundled copy. The `sqlite_fts5` tag enables full-text search. The release build | |
| 43 | 54 | uses the same tags; [Install](docs/install.md#build-from-source) covers other | |
| @@ -72,10 +83,10 @@ environment variables remain set. | |||
| 72 | 83 | ||
| 73 | 84 | ```sh | |
| 74 | 85 | export VOLE_DEV="$(mktemp -d)" | |
| 75 | ./vole admin init --dir "$VOLE_DEV" | ||
| 86 | vole admin init --dir "$VOLE_DEV" | ||
| 76 | 87 | export VOLE_CONFIG="$VOLE_DEV/vole.toml" | |
| 77 | ./vole admin account create dev | ||
| 78 | ./vole admin repo create playground --owner dev | ||
| 88 | vole admin account create dev | ||
| 89 | vole admin repo create playground --owner dev | ||
| 79 | 90 | ``` | |
| 80 | 91 | ||
| 81 | 92 | The temporary account does not need an SSH key because the next step enables | |
| @@ -97,7 +108,7 @@ environment variables remain set. | |||
| 97 | 108 | 3. Start the server: | |
| 98 | 109 | ||
| 99 | 110 | ```sh | |
| 100 | ./vole serve | ||
| 111 | vole serve | ||
| 101 | 112 | ``` | |
| 102 | 113 | ||
| 103 | 114 | The startup log reports the default SSH listener as `127.0.0.1:2222` and the | |
| @@ -113,7 +124,7 @@ environment variables remain set. | |||
| 113 | 124 | unset VOLE_CONFIG VOLE_DEV | |
| 114 | 125 | ``` | |
| 115 | 126 | ||
| 116 | After changing server code, stop the server, rebuild `./vole`, and start it | ||
| 127 | After changing server code, stop the server, run `go install` again, and start it | ||
| 117 | 128 | again. Configuration discovery and listener settings are documented in | |
| 118 | 129 | [Configuration](docs/configuration.md). | |
| 119 | 130 | ||
| @@ -163,7 +174,7 @@ python3 scripts/check-links.py | |||
| 163 | 174 | After changing command help or options, regenerate it from the source: | |
| 164 | 175 | ||
| 165 | 176 | ```sh | |
| 166 | go run -tags libsqlite3,sqlite_fts5 ./cmd/vole help --markdown > docs/cli.md | ||
| 177 | vole help --markdown > docs/cli.md | ||
| 167 | 178 | ``` | |
| 168 | 179 | ||
| 169 | 180 | Include the regenerated reference in the same change as the command change. The | |
| @@ -174,8 +185,8 @@ verify workflow fails when the file differs from the generated output. | |||
| 174 | 185 | Validate workflow definitions, then run the complete verification workflow: | |
| 175 | 186 | ||
| 176 | 187 | ```sh | |
| 177 | ./vole workflow check | ||
| 178 | ./vole workflow run verify | ||
| 188 | vole workflow check | ||
| 189 | vole workflow run verify | ||
| 179 | 190 | ``` | |
| 180 | 191 | ||
| 181 | 192 | `verify` runs formatting, vet, build, license and vulnerability scans, package, | |