* Upgrade gqlgen to v0.17.2
This enables builds on Go 1.18. github.com/vektah/gqlparser is upgraded
to the newest version too.
Getting this to work is a bit of a hazzle. I had to first remove
vendoring from the repository, perform the upgrade and then re-introduce
the vendor directory. I think gqlgens analysis went wrong for some
reason on the upgrade. It would seem a clean-room installation fixed it.
* Bump project to 1.18
* Update all packages, address gqlgenc breaking changes
* Let `go mod tidy` handle the go.mod file
* Upgrade linter to 1.45.2
* Introduce v1.45.2 of the linter
The linter now correctly warns on `strings.Title` because it isn't
unicode-aware. Fix this by using the suggested fix from x/text/cases
to produce unicode-aware strings.
The mapping isn't entirely 1-1 as this new approach has a larger iface:
it spans all of unicode rather than just ASCII. It coincides for ASCII
however, so things should be largely the same.
* Ready ourselves for errchkjson and contextcheck.
* Revert dockerfile golang version changes for now
Co-authored-by: Kermie <kermie@isinthe.house>
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
* Move main to cmd
* Move api to internal
* Move logger and manager to internal
* Move shell hiding code to separate package
* Decouple job from desktop and utils
* Decouple session from config
* Move static into internal
* Decouple config from dlna
* Move desktop to internal
* Move dlna to internal
* Decouple remaining packages from config
* Move config into internal
* Move jsonschema and paths to models
* Make ffmpeg functions private
* Move file utility methods into fsutil package
* Move symwalk into fsutil
* Move single-use util functions into client package
* Move slice functions to separate packages
* Add env var to suppress windowsgui arg
* Move hash functions into separate package
* Move identify to internal
* Move autotag to internal
* Touch UI when generating backend
* Docker CI builds: half the size, less than half the build time
* Add an "Official Build" Designator
* Fix .git constantly invalidating build cache, use distro ffmpeg
* Fix official build detection, add some compiler image docs
Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
When the golangci workflow action was added, we moved large parts of
validation to the parallel action. However, integration testing still
has to happen on the main build action, as it isn't covered by the
validation action.
Reenable the `it` target through docker container build.
This fixes backend test errors sneaking through the build action.
* Add golangci-lint workflow
* Add a bit more lenient linter timeout
1 Minute isn't always enough, so bump to 3.
* Document golangci, add make target
Document how to get golangci-lint in the README file. While here,
provide a QOL target in the makefile
for the linter, and make it part of validation.
* Introduce .golangci.yml
This is the default golangci-lint configuration file location. Use it.
Move configuration into the yaml file, and enable the default set of
linters; we know we pass most of those.
* Add gofmt and revive to golangci-lint
Read the golangci-lint source code to figure out the configuration format.
Copy the configuration from `revive.toml` into the linter configuration.
* Do not set simplify on gofmt
The project currently runs without simplify. So for consistency, don't
make that a requirement for the linter.
* Add new-from-rev
Older issues should not be considered a failure for new PRs and issues.
Use new-from-from to make the current develop as the point-in-time for
when we consider errors.
Once in the tree, we can go and fix the older errors in separate
patches, taking a little bit at a time.
* Move to golangci-lint
Rewrite the way we run targets in the makefile, so it is split between
frontend and backend.
Use the frontend build steps in build.yml
Update README to reflect the new world order.
* Remove check-gofmt.sh
The tool now runs as part of golangci-lint, in particular through the
'validate' target in the Makefile.
* Remove targets for golangci-lint
Fold these targets into the `lint` target. While here, update README.
* Bump Go to 1.17, refactor build/x86_64 Dockerfile to make better use of multi-stage
* Bump to 1.17 from 1.16
* Bump packr version, provide needed legacy env var
* Add apple silicon support, fix macos build chain
* Update unused travis ci
* Run in same container
* Add cross compile targets to makefile
* Use make targets and existing container
* Cache UI build
* Update cross-compile script
The toolchain is already bundled in the stashapp/compiler image.
Rather than introducing a second one via GH actions standardize on that
one instead.
Also
* Clear up what "Cross Compile" actually does
* Still pull stashapp/compiler separately for easier debugability.