Website: update & expand doc of mage and make targets

Update & expand the available argets for `mage` and `make`.
This commit is contained in:
Sybren A. Stüvel 2025-06-17 10:14:46 +02:00
parent 564375d40f
commit 67d66422fd

View File

@ -25,29 +25,37 @@ This builds Flamenco Manager, including its webapp, and Flamenco Worker.
```
$ go run mage.go -l
Targets:
build Flamenco Manager and Flamenco Worker, including the webapp and the add-on
check Run unit tests, check for vulnerabilities, and run the linter
clean Remove executables and other build output
devServerWebapp
flamencoManager Build Flamenco Manager with the webapp and add-on ZIP embedded
flamencoManagerWithoutWebapp Only build the Flamenco Manager executable, do not rebuild the webapp
flamencoWorker Build the Flamenco Worker executable
generate code (OpenAPI and test mocks)
generateGo Generate Go code for Flamenco Manager and Worker
generateJS Generate JavaScript code for the webapp
generatePy Generate Python code for the add-on
govulncheck Check for known vulnerabilities.
installDeps Install build-time dependencies: code generators and NodeJS dependencies.
installDepsWebapp Use Yarn to install the webapp's NodeJS dependencies
installGenerators Install code generators.
staticcheck Analyse the source code.
test Run unit tests
version Show which version information would be embedded in executables
vet Run `go vet`
webappStatic Build the webapp as static files that can be served
```
Will list these targets:
| Target | Description |
|------------------------------|------------------------------------------------------------------------------------------------------|
| build | Flamenco Manager and Flamenco Worker, including the webapp and the add-on |
| check | Run unit tests, check for vulnerabilities, and run the linter |
| clean | Remove executables and other build output |
| devServerWebapp | |
| flamencoManager | Build Flamenco Manager with the webapp and add-on ZIP embedded |
| flamencoManagerRace | Build the Flamenco Manager executable with race condition checker enabled, do not rebuild the webapp |
| flamencoManagerWithoutWebapp | Only build the Flamenco Manager executable, do not rebuild the webapp |
| flamencoWorker | Build the Flamenco Worker executable |
| format | Run `gofmt`, formatting all the source code. |
| formatCheck | Run `gofmt` on all the source code, reporting all differences. |
| generate | code (OpenAPI and test mocks) |
| generateGo | Generate Go code for Flamenco Manager and Worker |
| generateJS | Generate JavaScript code for the webapp |
| generatePy | Generate Python code for the add-on |
| govulncheck | Check for known vulnerabilities. |
| installDeps | Install build-time dependencies: code generators and NodeJS dependencies. |
| installDepsWebapp | Use Yarn to install the webapp's NodeJS dependencies |
| installGenerators | Install code generators. |
| staticcheck | Analyse the source code. |
| test | Run unit tests |
| version | Show which version information would be embedded in executables |
| vet | Run `go vet` |
| webappStatic | Build the webapp as static files that can be served |
### Faster Re-builds
The above commands first build the build tool itself, and then run it. The build
@ -64,7 +72,7 @@ $ ./magefiles/mage build
targets are available with `make` only. These are mostly for release-related
functionality like updating the Flamenco version, or building release packages.
These `make` targets are available:
These are the main `make` targets:
| Target | Description |
|-----------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|
@ -72,8 +80,8 @@ These `make` targets are available:
| `flamenco-manager` | Builds just Flamenco Manager. This includes packing the webapp and the Blender add-on into the executable. |
| `flamenco-worker` | Builds just Flamenco Worker. |
| `flamenco-manager-without-webapp` | Builds Flamenco Manager without rebuilding the webapp. This is useful to speed up the build when you're using the webapp development server (see below) |
| `webapp` | Installs the webapp dependencies, so that the development server can be run with `yarn --cwd web/app run dev --host` |
| `webapp-static` | Builds the webapp so that it can be served as static files by Flamenco Manager. |
| `devserver-website` | Run the website locally, in a development server that monitors for file changes and auto-refreshes your browser. |
| `devserver-webapp` | Run the Manager webapp locally in a development server. |
| `generate` | Generate the Go, Python, and JavaScript code. |
| `generate-go` | Generate the Go code, which includes OpenAPI code, as well as mocks for the unit tests. |
| `generate-py` | Generate the Python code, containing the OpenAPI client code for the Blender add-on. |
@ -81,6 +89,12 @@ These `make` targets are available:
| `test` | Run the unit tests. |
| `clean` | Remove build-time files. |
| `version` | Print some version numbers, mostly for debugging the Makefile itself. |
| `format` | Run the auto-formatter on all Go code. |
| `format-check` | Check that the Go source code is formatted correctly. |
| `list-embedded` | List the files embedded into the `flamenco-manager` executable. |
| `tools` | Download FFmpeg for all supported platforms. Can be suffixed by `-linux`, `-windows`, or `-darwin` to only download for specific platforms. |
| `update-version` | Takes the `VERSION` and `RELEASE_CYCLE` declared at the top of the `Makefile` and uses that to update various source files. |
| `release-package` | Builds release packages for all supported platforms. Can be suffixed by `-linux`, `-windows`, or `-darwin` to only build specific platforms. |
| `db-migrate-status` | Database migration: show the current version of the database schema. |
| `db-migrate-up` | Database migration: perform one migration step towards the latest version. |
| `db-migrate-down` | Database migration: roll back one migration step, so go to an older version. This may not be lossless. |