Commit Graph

23 Commits

Author SHA1 Message Date
WithoutPants 9e2261a813
Temporarily disable caching in lint action 2022-04-02 18:41:43 +11:00
SmallCoccinelle 45f700d6ea
Support Go 1.18: Upgrade gqlgen to v0.17.2 (#2443)
* 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>
2022-04-02 18:08:14 +11:00
WithoutPants f69bd8a94f
Restructure go project (#2356)
* 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
2022-03-17 11:33:59 +11:00
WithoutPants 9ef3060452
Fix release asset uploads (#2372) 2022-03-08 11:10:56 +11:00
WithoutPants 10bd202df3
Disable macos bundling until issues resolved (#2343)
* Disable macos bundling until issues resolved
* Update README
2022-02-25 11:04:25 +11:00
kermieisinthehouse 0e514183a7
Desktop integration (#2073)
* Open stash in system tray on Windows/MacOS
* Add desktop notifications
* MacOS Bundling
* Add binary icon

Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
2022-02-03 11:20:34 +11:00
WithoutPants bf59028bcd
Bump go cache (#1919) 2021-10-28 17:00:24 +11:00
kermieisinthehouse f80a5e3222
Docker+Build optimizations (#1833)
* 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>
2021-10-22 13:14:08 +11:00
SmallCoccinelle b94eecae24
Fix integration-testing in the build action (#1784)
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.
2021-09-28 09:28:05 +10:00
SmallCoccinelle a2cce0ba77
Add golangci-lint workflow (#1759)
* 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.
2021-09-27 10:41:59 +10:00
WithoutPants cceaff780b
Update build.yml 2021-09-23 12:41:39 +10:00
WithoutPants 8d9eb7f1e4
Create temp UI file so that embed doesn't fail 2021-09-23 11:13:32 +10:00
WithoutPants 56111433a1
Replace packr with go embed (#1751)
* Embed performer images
* Embed schema migrations
* Update dependencies
* Embed UI
* Remove remaining packr references
2021-09-22 13:08:34 +10:00
WithoutPants f3c8407c40
Cancel in progress builds when new action starts 2021-09-21 12:05:46 +10:00
kermieisinthehouse 265d5f4c70
Apple Silicon Support, Bump Go to 1.17, refactor docker/build/x86_64/Dockerfile (#1646)
* 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
2021-09-08 15:30:15 +10:00
gitgiggety aecab2d131
Tag stable versions with the version number on Docker (#1550)
Fixes #1546
2021-07-13 09:59:09 +10:00
WithoutPants 9d138278c2
Github build action refinement and caching (#1295)
* Run in same container
* Add cross compile targets to makefile
* Use make targets and existing container
* Cache UI build
* Update cross-compile script
2021-05-16 19:19:56 +10:00
WithoutPants 3f0c965400
Fix development releases 2021-05-01 11:19:21 +10:00
stashist 34f114faff
Simplify GH build pipeline. (#1268)
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.
2021-04-13 16:11:19 +10:00
WithoutPants cad96b7872
Update build.yml 2021-03-29 12:59:03 +11:00
WithoutPants af6b21a428
Update latest_develop tag 2021-02-24 14:36:39 +11:00
WithoutPants 8ec25ef161
Add commitish for dev release 2021-02-24 13:48:56 +11:00
WithoutPants 777956f0ab
GitHub actions (#1146) 2021-02-24 11:26:48 +11:00