12 Commits

Author SHA1 Message Date
Sybren A. Stüvel
0eae746b18 Bumped version to 3.8-alpha1 2025-04-03 12:26:13 +02:00
Sybren A. Stüvel
d7eca92950 Bump version to 3.7 2025-04-03 12:16:42 +02:00
Sybren A. Stüvel
f6d1d85722 Mage: Add gofmt to the Mage commands
Add two new mage commands:

- `mage format`: run `gofmt` on all the Go sources.
- `mage formatCheck`: run the formatter to check formatting issues. This
  will output the diff to make the code format-compliant.

These commands are also available via `make format` resp. `make
format-check`.
2025-03-24 18:12:27 +01:00
Sybren A. Stüvel
b80bad12cd Bump version to 3.7-beta1 2025-02-28 12:32:40 +01:00
Sybren A. Stüvel
234cfbf983 Manager: add mage target for building with the race condition checker
Run `mage FlamencoManagerRace` to build Flamenco Manager with the
race condition checker enabled.

See https://go.dev/doc/articles/race_detector
2025-01-09 14:39:21 +01:00
Sybren A. Stüvel
44be746ab6 Bumped version to 3.7-alpha1 2024-12-01 15:06:51 +01:00
Sybren A. Stüvel
940f814fcc Bumped version to 3.6 2024-12-01 14:54:15 +01:00
Sybren A. Stüvel
def44abb64 Mage: forward LDFLAGS environment variable to Go build command
When building Flamenco Manager/Worker, forward the `LDFLAGS` environment
variable value to the build command. This makes it possible to override
certain variables, like the default configuration file location.
2024-11-11 11:55:46 +01:00
Sybren A. Stüvel
30997013b1 Fix: Blender add-on was accidentally built as flamenco3-addon.zip
The Mage-based build tools accidentally built the add-on as
`flamenco3-addon.zip` instead of `flamenco-addon.zip`.
2024-11-11 10:55:48 +01:00
Sybren A. Stüvel
479f35b658 Mage: avoid creating web/static/emptyfile with wrong permissions
The empty file is created so that Go has something to embed when building
Flamenco  Manager, even when the static files aren't built yet. On macOS
this was done with the wrong permissions, though.
2024-10-05 10:25:02 +02:00
Sybren A. Stüvel
4ae4b892fd Mage: remove duplicated targets
The same functionality was available as two Mage targets.

WebappInstallDeps has been removed, in favour of InstallDepsWebapp.
2024-10-04 22:46:46 +02:00
Sybren A. Stüvel
5f37bcb629 Build with Magefile (#104341)
Convert most of the code in `Makefile` to [Magefile](https://magefile.org/):

This makes it possible to build Flamenco without `make` (and the POSIX environment/commands it expect) by running:

```bash
$ go run mage.go webappInstallDeps  # Only on the first build.
$ go run mage.go build
```

More efficient builds are possible with other commands, and some release-related commands still require `make`. At least the barrier to entry should be considerably lower (compared to having to install Make + Cygwin/MSYS2 on Windows).

Fix: #102633

This does not port the building of release packages, so it doesn't address #102671.

### Main Targets

| Target   | Description                                                                     |
|----------|---------------------------------------------------------------------------------|
| build    | 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                                       |
| generate | Generate code (OpenAPI and test mocks)                                          |

### All Targets

Get these via `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
  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.
  staticcheck                     Analyse the source code.
  test                            Run unit tests
  version                         Show which version information would be embedded in executables
  vet                             Run `go vet`
  webappInstallDeps               Use Yarn to install the webapp's NodeJS dependencies
  webappStatic                    Build the webapp as static files that can be served
```

Co-authored-by: Mateus Abelli <mateusabelli@gmail.com>
Reviewed-on: https://projects.blender.org/studio/flamenco/pulls/104341
2024-10-04 21:59:44 +02:00