From 95f88e5d939218b038ab8d0dd6776120aee53ceb Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 10 Mar 2025 17:21:56 +0000 Subject: [PATCH 1/4] [chore] add warning message when wazero compiler not supported (#3894) * add warning message when wazero compiler not supported, update supported platforms in README * whoops don't return a reason string for arm64, since it should always be supported --- README.md | 8 +++---- internal/media/ffmpeg/wasm.go | 41 ++++++++++++++++++++++++----------- 2 files changed, 32 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 1968ba521..5e9172926 100644 --- a/README.md +++ b/README.md @@ -292,13 +292,13 @@ This is the current status of support offered by GoToSocial for different platfo #### 64-bit -64-bit platforms require the following (now, very common) CPU features: +Notes on 64-bit CPU feature requirements: -- x86-64 require SSE4.1 (for both media decoding and WASM SQLite) +- x86_64 requires the SSE4.1 instruction set. (CPUs manufactured after ~2010) -- Armv8 require ARM64 Large System Extensions (specifically when using WASM SQLite) +- ARM64 requires no specific features, ARMv8 CPUs (and later) have all required features. -Without these features, performance will suffer. In these situations, you may have some success building a binary yourself with the totally **unsupported, experimental** [nowasm](https://docs.gotosocial.org/en/latest/advanced/builds/nowasm/) tag. +If any of the above features are missing, performance of media processing (and possibly, SQLite) will suffer. In these situations, you may have some success building a binary yourself with the totally **unsupported, experimental** [nowasm](https://docs.gotosocial.org/en/latest/advanced/builds/nowasm/) tag. #### BSDs diff --git a/internal/media/ffmpeg/wasm.go b/internal/media/ffmpeg/wasm.go index 29e547364..51735bec1 100644 --- a/internal/media/ffmpeg/wasm.go +++ b/internal/media/ffmpeg/wasm.go @@ -28,6 +28,7 @@ import ( "codeberg.org/gruf/go-ffmpreg/embed" "codeberg.org/gruf/go-ffmpreg/wasm" + "github.com/superseriousbusiness/gotosocial/internal/log" "github.com/tetratelabs/wazero" "golang.org/x/sys/cpu" ) @@ -50,14 +51,20 @@ func initWASM(ctx context.Context) error { var cfg wazero.RuntimeConfig - // Create new runtime config, taking bug into account: - // taking https://github.com/tetratelabs/wazero/pull/2365 - // - // Thanks @ncruces (of go-sqlite3) for the fix! - if compilerSupported() { - cfg = wazero.NewRuntimeConfigCompiler() - } else { - cfg = wazero.NewRuntimeConfigInterpreter() + // Allocate new runtime config, letting + // wazero determine compiler / interpreter. + cfg = wazero.NewRuntimeConfig() + + // Though still perform a check of CPU features at + // runtime to warn about slow interpreter performance. + if reason, supported := compilerSupported(); !supported { + log.Warn(ctx, "!!! WAZERO COMPILER MAY NOT BE AVAILABLE !!!"+ + " Reason: "+reason+"."+ + " Wazero will likely fall back to interpreter mode,"+ + " resulting in poor performance for media processing (and SQLite, if in use)."+ + " For more info and possible workarounds, please check:"+ + " https://docs.gotosocial.org/en/latest/getting_started/releases/#supported-platforms", + ) } if dir := os.Getenv("GTS_WAZERO_COMPILATION_CACHE"); dir != "" { @@ -121,7 +128,7 @@ func initWASM(ctx context.Context) error { return nil } -func compilerSupported() bool { +func compilerSupported() (string, bool) { switch runtime.GOOS { case "linux", "android", "windows", "darwin", @@ -129,15 +136,23 @@ func compilerSupported() bool { "solaris", "illumos": break default: - return false + return "unsupported OS", false } switch runtime.GOARCH { case "amd64": - return cpu.X86.HasSSE41 + // NOTE: wazero in the future may decouple the + // requirement of simd (sse4_1) from requirements + // for compiler support in the future, but even + // still our module go-ffmpreg makes use of them. + return "amd64 SSE4.1 required", cpu.X86.HasSSE41 case "arm64": - return true + // NOTE: this particular check may change if we + // later update go-ffmpreg to a version that makes + // use of threads, i.e. v7.x.x. in that case we would + // need to check for cpu.ARM64.HasATOMICS. + return "", true default: - return false + return "unsupported ARCH", false } } From bad12a62e60bacf5222e39e26f7da97fdea23c15 Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 10 Mar 2025 19:40:16 +0000 Subject: [PATCH 2/4] bumps our uptrace/bun dependencies to v1.2.11 (#3895) --- go.mod | 8 ++-- go.sum | 16 ++++---- vendor/github.com/uptrace/bun/CHANGELOG.md | 16 ++++++++ .../uptrace/bun/dialect/pgdialect/version.go | 2 +- .../bun/dialect/sqlitedialect/version.go | 2 +- vendor/github.com/uptrace/bun/migrate/auto.go | 2 +- .../uptrace/bun/model_table_has_many.go | 37 +++++++++---------- vendor/github.com/uptrace/bun/package.json | 2 +- vendor/github.com/uptrace/bun/schema/table.go | 10 ++--- vendor/github.com/uptrace/bun/version.go | 2 +- vendor/modules.txt | 8 ++-- 11 files changed, 60 insertions(+), 45 deletions(-) diff --git a/go.mod b/go.mod index 31c5c1b8c..dc216caef 100644 --- a/go.mod +++ b/go.mod @@ -66,10 +66,10 @@ require ( github.com/tetratelabs/wazero v1.9.0 github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80 github.com/ulule/limiter/v3 v3.11.2 - github.com/uptrace/bun v1.2.10 - github.com/uptrace/bun/dialect/pgdialect v1.2.10 - github.com/uptrace/bun/dialect/sqlitedialect v1.2.10 - github.com/uptrace/bun/extra/bunotel v1.2.10 + github.com/uptrace/bun v1.2.11 + github.com/uptrace/bun/dialect/pgdialect v1.2.11 + github.com/uptrace/bun/dialect/sqlitedialect v1.2.11 + github.com/uptrace/bun/extra/bunotel v1.2.11 github.com/wagslane/go-password-validator v0.3.0 github.com/yuin/goldmark v1.7.8 go.opentelemetry.io/otel v1.35.0 diff --git a/go.sum b/go.sum index bafab8eb6..da7496636 100644 --- a/go.sum +++ b/go.sum @@ -450,14 +450,14 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ulule/limiter/v3 v3.11.2 h1:P4yOrxoEMJbOTfRJR2OzjL90oflzYPPmWg+dvwN2tHA= github.com/ulule/limiter/v3 v3.11.2/go.mod h1:QG5GnFOCV+k7lrL5Y8kgEeeflPH3+Cviqlqa8SVSQxI= -github.com/uptrace/bun v1.2.10 h1:6TlxUQhGxiiv7MHjzxbV6ZNt/Im0PIQ3S45riAmbnGA= -github.com/uptrace/bun v1.2.10/go.mod h1:ww5G8h59UrOnCHmZ8O1I/4Djc7M/Z3E+EWFS2KLB6dQ= -github.com/uptrace/bun/dialect/pgdialect v1.2.10 h1:+PAGCVyWDoAjMuAgn0+ud7fu3It8+Xvk7HQAJ5wCXMQ= -github.com/uptrace/bun/dialect/pgdialect v1.2.10/go.mod h1:hv0zsoc3PeW5fl3JeBglZT1vl2FoERY+QwvuvKsKATA= -github.com/uptrace/bun/dialect/sqlitedialect v1.2.10 h1:/74GDx1hnRrrmIvqpNbbFwD28sW1z+i/QjQSVy6XnnY= -github.com/uptrace/bun/dialect/sqlitedialect v1.2.10/go.mod h1:xBx+N2q4G4s51tAxZU5vKB3Zu0bFl1uRmKqZwCPBilg= -github.com/uptrace/bun/extra/bunotel v1.2.10 h1:Qkg0PrpcnlC9AvqCfqTL3seZHc5t1siKdSFUPCxql+Q= -github.com/uptrace/bun/extra/bunotel v1.2.10/go.mod h1:FP1Bx8AIK8WYVM1OL/ynpcnkg7xjBkTCB91PEjFhdmU= +github.com/uptrace/bun v1.2.11 h1:l9dTymsdZZAoSZ1+Qo3utms0RffgkDbIv+1UGk8N1wQ= +github.com/uptrace/bun v1.2.11/go.mod h1:ww5G8h59UrOnCHmZ8O1I/4Djc7M/Z3E+EWFS2KLB6dQ= +github.com/uptrace/bun/dialect/pgdialect v1.2.11 h1:n0VKWm1fL1dwJK5TRxYYLaRKRe14BOg2+AQgpvqzG/M= +github.com/uptrace/bun/dialect/pgdialect v1.2.11/go.mod h1:NvV1S/zwtwBnW8yhJ3XEKAQEw76SkeH7yUhfrx3W1Eo= +github.com/uptrace/bun/dialect/sqlitedialect v1.2.11 h1:t4OIcbkWnRPshRj7ZnbHVwUENa3OHhCUruyFcl3P+TY= +github.com/uptrace/bun/dialect/sqlitedialect v1.2.11/go.mod h1:XHFFTvdlNtNFWPhpRAConN6DnVgt9EHr5G5IIarHYyg= +github.com/uptrace/bun/extra/bunotel v1.2.11 h1:ddt96XrbvlVZu5vBddP6WmbD6bdeJTaWY9jXlfuJKZE= +github.com/uptrace/bun/extra/bunotel v1.2.11/go.mod h1:w6Mhie5tLFeP+5ryjq4PvgZEESRJ1iL2cbvxhm+f8q4= github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 h1:ZjUj9BLYf9PEqBn8W/OapxhPjVRdC6CsXTdULHsyk5c= github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2/go.mod h1:O8bHQfyinKwTXKkiKNGmLQS7vRsqRxIQTFZpYpHK3IQ= github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= diff --git a/vendor/github.com/uptrace/bun/CHANGELOG.md b/vendor/github.com/uptrace/bun/CHANGELOG.md index 512443a12..8d59c5c4a 100644 --- a/vendor/github.com/uptrace/bun/CHANGELOG.md +++ b/vendor/github.com/uptrace/bun/CHANGELOG.md @@ -1,3 +1,19 @@ +## [1.2.11](https://github.com/uptrace/bun/compare/v1.2.10...v1.2.11) (2025-03-05) + + +### Bug Fixes + +* always use the value returned by implemented driver.Valuer ([0c29af6](https://github.com/uptrace/bun/commit/0c29af65f17891d15019e60f64704e9c45204062)) +* handle driver.Valuer in getRealValue ([fa37c7b](https://github.com/uptrace/bun/commit/fa37c7b91e570ca032d01d7311245a07b52dbed8)) +* only handle pointer-based driver.Valuer implementations ([40b20cd](https://github.com/uptrace/bun/commit/40b20cd207a22b8b8f86ec36c62385f6293c192a)) +* **schema:** determine whether a field is ambiguous with prefix ([83f6f99](https://github.com/uptrace/bun/commit/83f6f992bf38a654207b27fcc3bd4ea1984c9acb)) +* **schema:** process embed with struct ([a06003d](https://github.com/uptrace/bun/commit/a06003d867168a663b1ad223bbed85b3d94fd920)), closes [#1136](https://github.com/uptrace/bun/issues/1136) +* **test:** define uuid type for pointer primary keys ([3b72bd4](https://github.com/uptrace/bun/commit/3b72bd4cd045aa8061b7ca8b1cb00eae6c4016f0)) +* **test:** use varchar to be compatible with multiple databases ([287b0e3](https://github.com/uptrace/bun/commit/287b0e386feeab7391b749723c32377e5315a870)) +* **typo:** minor typo fix in `migrate/auto.go` ([368ed3f](https://github.com/uptrace/bun/commit/368ed3f2e2a65fbad50b26080efb33366b793e83)) + + + ## [1.2.10](https://github.com/uptrace/bun/compare/v1.2.9...v1.2.10) (2025-02-18) diff --git a/vendor/github.com/uptrace/bun/dialect/pgdialect/version.go b/vendor/github.com/uptrace/bun/dialect/pgdialect/version.go index 59d0bc649..d646f564f 100644 --- a/vendor/github.com/uptrace/bun/dialect/pgdialect/version.go +++ b/vendor/github.com/uptrace/bun/dialect/pgdialect/version.go @@ -2,5 +2,5 @@ package pgdialect // Version is the current release version. func Version() string { - return "1.2.10" + return "1.2.11" } diff --git a/vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go b/vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go index c7211d1bd..d03bb5e9d 100644 --- a/vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go +++ b/vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go @@ -2,5 +2,5 @@ package sqlitedialect // Version is the current release version. func Version() string { - return "1.2.10" + return "1.2.11" } diff --git a/vendor/github.com/uptrace/bun/migrate/auto.go b/vendor/github.com/uptrace/bun/migrate/auto.go index 16804cd99..8656902ca 100644 --- a/vendor/github.com/uptrace/bun/migrate/auto.go +++ b/vendor/github.com/uptrace/bun/migrate/auto.go @@ -191,7 +191,7 @@ func (am *AutoMigrator) plan(ctx context.Context) (*changeset, error) { } // Migrate writes required changes to a new migration file and runs the migration. -// This will create and entry in the migrations table, making it possible to revert +// This will create an entry in the migrations table, making it possible to revert // the changes with Migrator.Rollback(). MigrationOptions are passed on to Migrator.Migrate(). func (am *AutoMigrator) Migrate(ctx context.Context, opts ...MigrationOption) (*MigrationGroup, error) { migrations, _, err := am.createSQLMigrations(ctx, false) diff --git a/vendor/github.com/uptrace/bun/model_table_has_many.go b/vendor/github.com/uptrace/bun/model_table_has_many.go index c7bdee98a..dd74a774c 100644 --- a/vendor/github.com/uptrace/bun/model_table_has_many.go +++ b/vendor/github.com/uptrace/bun/model_table_has_many.go @@ -152,25 +152,24 @@ func modelKey(key []interface{}, strct reflect.Value, fields []*schema.Field) [] // indirectAsKey return the field value dereferencing the pointer if necessary. // The value is then used as a map key. func indirectAsKey(field reflect.Value) interface{} { - if field.Kind() != reflect.Ptr { - i := field.Interface() - if valuer, ok := i.(driver.Valuer); ok { - if v, err := valuer.Value(); err == nil { - switch reflect.TypeOf(v).Kind() { - case reflect.Array, reflect.Chan, reflect.Func, - reflect.Map, reflect.Ptr, reflect.Slice, reflect.UnsafePointer: - // NOTE #1107, these types cannot be used as map key, - // let us use original logic. - return i - default: - return v - } - } - } - return i - } - if field.IsNil() { + if field.Kind() == reflect.Pointer && field.IsNil() { return nil } - return field.Elem().Interface() + + i := field.Interface() + if valuer, ok := i.(driver.Valuer); ok { + if v, err := valuer.Value(); err == nil { + switch reflect.TypeOf(v).Kind() { + case reflect.Array, reflect.Chan, reflect.Func, + reflect.Map, reflect.Pointer, reflect.Slice, reflect.UnsafePointer: + // NOTE #1107, these types cannot be used as map key, + // let us use original logic. + return i + default: + return v + } + } + } + + return reflect.Indirect(field).Interface() } diff --git a/vendor/github.com/uptrace/bun/package.json b/vendor/github.com/uptrace/bun/package.json index 9302e6b3f..cb1c8d237 100644 --- a/vendor/github.com/uptrace/bun/package.json +++ b/vendor/github.com/uptrace/bun/package.json @@ -1,6 +1,6 @@ { "name": "gobun", - "version": "1.2.10", + "version": "1.2.11", "main": "index.js", "repository": "git@github.com:uptrace/bun.git", "author": "Vladimir Mihailenco ", diff --git a/vendor/github.com/uptrace/bun/schema/table.go b/vendor/github.com/uptrace/bun/schema/table.go index cf9f49197..93313597b 100644 --- a/vendor/github.com/uptrace/bun/schema/table.go +++ b/vendor/github.com/uptrace/bun/schema/table.go @@ -171,7 +171,7 @@ func (t *Table) processFields(typ reflect.Type) { if _, ok := ebdStructs[k]; !ok { ebdStructs[k] = &structField{ Index: makeIndex(sf.Index, v.Index), - Table: subtable, + Table: v.Table, } } } @@ -259,13 +259,13 @@ func (t *Table) processFields(typ reflect.Type) { } for _, embfield := range embedded { - subfield := embfield.subfield.Clone() - - if ambiguousNames[subfield.Name] > 1 && - !(!subfield.Tag.IsZero() && ambiguousTags[subfield.Name] == 1) { + if ambiguousNames[embfield.prefix+embfield.subfield.Name] > 1 && + !(!embfield.subfield.Tag.IsZero() && ambiguousTags[embfield.prefix+embfield.subfield.Name] == 1) { continue // ambiguous embedded field } + subfield := embfield.subfield.Clone() + subfield.Index = makeIndex(embfield.index, subfield.Index) if embfield.prefix != "" { subfield.Name = embfield.prefix + subfield.Name diff --git a/vendor/github.com/uptrace/bun/version.go b/vendor/github.com/uptrace/bun/version.go index ad851b003..a7973efeb 100644 --- a/vendor/github.com/uptrace/bun/version.go +++ b/vendor/github.com/uptrace/bun/version.go @@ -2,5 +2,5 @@ package bun // Version is the current release version. func Version() string { - return "1.2.10" + return "1.2.11" } diff --git a/vendor/modules.txt b/vendor/modules.txt index 82637f643..aaf95bc63 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -911,7 +911,7 @@ github.com/ugorji/go/codec github.com/ulule/limiter/v3 github.com/ulule/limiter/v3/drivers/store/common github.com/ulule/limiter/v3/drivers/store/memory -# github.com/uptrace/bun v1.2.10 +# github.com/uptrace/bun v1.2.11 ## explicit; go 1.22.0 github.com/uptrace/bun github.com/uptrace/bun/dialect @@ -925,13 +925,13 @@ github.com/uptrace/bun/internal/tagparser github.com/uptrace/bun/migrate github.com/uptrace/bun/migrate/sqlschema github.com/uptrace/bun/schema -# github.com/uptrace/bun/dialect/pgdialect v1.2.10 +# github.com/uptrace/bun/dialect/pgdialect v1.2.11 ## explicit; go 1.22.0 github.com/uptrace/bun/dialect/pgdialect -# github.com/uptrace/bun/dialect/sqlitedialect v1.2.10 +# github.com/uptrace/bun/dialect/sqlitedialect v1.2.11 ## explicit; go 1.22.0 github.com/uptrace/bun/dialect/sqlitedialect -# github.com/uptrace/bun/extra/bunotel v1.2.10 +# github.com/uptrace/bun/extra/bunotel v1.2.11 ## explicit; go 1.22.0 github.com/uptrace/bun/extra/bunotel # github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2 From 0c49d5abb8c753f1c7e3628a9363c31589ad5de0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 11 Mar 2025 09:05:23 +0100 Subject: [PATCH 3/4] [bugfix] Fix panic when opening instance actor in web view (#3898) --- internal/db/bundb/account.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/db/bundb/account.go b/internal/db/bundb/account.go index c5f9148a9..f905101e4 100644 --- a/internal/db/bundb/account.go +++ b/internal/db/bundb/account.go @@ -1021,6 +1021,12 @@ func (a *accountDB) GetAccountWebStatuses( limit int, maxID string, ) ([]*gtsmodel.Status, error) { + if account.Username == config.GetHost() { + // Instance account + // doesn't post statuses. + return nil, nil + } + // Check for an easy case: account exposes no statuses via the web. webVisibility := account.Settings.WebVisibility if webVisibility == gtsmodel.VisibilityNone { From 6c5d369b05cf8eae86bcea5fdc85ebdd4dd2d901 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 11 Mar 2025 09:05:33 +0100 Subject: [PATCH 4/4] [docs] Update swagger docs command (#3897) --- CONTRIBUTING.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fecceb5bf..ee8023012 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -158,9 +158,9 @@ Be sure to run `git fetch` before building the project for the first time. #### Binary -To get started, you first need to have Go installed. GtS is currently using Go 1.21, so you should take that too. See [here](https://golang.org/doc/install) for installation instructions. +To get started, you first need to have Go installed. Check the top of the `go.mod` file to see which version of Go you need to install, and see [here](https://golang.org/doc/install) for installation instructions. -Once you've got go installed, clone this repository into your Go path. Normally, this should be `~/go/src/github.com/superseriousbusiness/gotosocial`. +Once you've got Go installed, clone this repository into your Go path. Normally, this should be `~/go/src/github.com/superseriousbusiness/gotosocial`. Once you've installed the prerequisites, you can try building the project: `./scripts/build.sh`. This will build the `gotosocial` binary. @@ -188,8 +188,6 @@ Normally, these processes are handled by Drone (see CI/CD above). However, you c To do this, first [install GoReleaser](https://goreleaser.com/install/). -Then install GoSwagger as described in [the Swagger section](#updating-swagger-docs). - Then install Node and Yarn as described in [Stylesheet / Web dev](#stylesheet--web-dev). Finally, to create a snapshot build, do: @@ -202,7 +200,7 @@ If all goes according to plan, you should now have a number of multiple-architec ##### Manually -If you prefer a simple approach to building a Docker container, with fewer dependencies (go-swagger, Node, Yarn), you can also just build in the following way: +If you prefer a simple approach to building a Docker container, with fewer dependencies (Node, Yarn), you can also just build in the following way: ```bash ./scripts/build.sh && docker buildx build -t superseriousbusiness/gotosocial:latest . @@ -210,6 +208,8 @@ If you prefer a simple approach to building a Docker container, with fewer depen The above command first builds the `gotosocial` binary, then invokes Docker buildx to build the container image. +If you get an error while doing the build that looks like `"/web/assets/swagger.yaml": not found`, then you need to (re)generate the Swagger docs once, see [Updating Swagger docs](#updating-swagger-docs) for the command. + If you want to build a docker image for a different CPU architecture without setting up buildx (for example for ARMv7 aka 32-bit ARM), first modify the Dockerfile by adding the following lines to the top (but don't commit this!): ```dockerfile @@ -484,14 +484,16 @@ You'll additionally need functioning DNS for your two instance names, which you GoToSocial uses [go-swagger](https://goswagger.io) to generate Swagger API documentation from code annotations. -You can install go-swagger following the instructions [here](https://goswagger.io/go-swagger/install/). - -If you change Swagger annotations on any of the API paths, you can generate a new Swagger file at `./docs/api/swagger.yaml` by running: +If you change Swagger annotations on any of the API paths, you can generate a new Swagger file at `./docs/api/swagger.yaml`, and copy that file to web assets, by running: ```bash -go run github.com/go-swagger/go-swagger/cmd/swagger generate spec --scan-models --exclude-deps --output docs/api/swagger.yaml +go run ./vendor/github.com/go-swagger/go-swagger/cmd/swagger \ +generate spec --scan-models --exclude-deps -o docs/api/swagger.yaml \ +&& cp docs/api/swagger.yaml web/assets/swagger.yaml ``` +You shouldn't need to install go-swagger to run this command, as it's already included in the `vendor` folder. + ### CI/CD configuration GoToSocial uses [Drone](https://www.drone.io/) for CI/CD tasks like running tests, linting, and building Docker containers.