Commit graph

65 commits

Author SHA1 Message Date
ze0s
9caf7807de
build: goreleaser snapshot during pr builds (#2082) 2025-06-01 15:11:29 +02:00
ze0s
1ae8624e05
build(deps): bump Go to 1.24 (#2060)
* build(deps): bump Go to 1.24
2025-05-01 16:36:55 +02:00
ze0s
e137ac4070
build(ci): setup goreleaser-pro (#2020)
* build: setup goreleaser-pro

* fix: set env key from secrets
2025-04-05 11:16:24 -07:00
dependabot[bot]
33d7d75597
build(deps): bump the npm group in /web with 18 updates (#1957) 2025-02-08 12:58:19 +00:00
nuxen
b07556ceaa
feat(ci): skip build on misc files (#1854)
feat(ci): don't build on misc files
2024-12-01 21:20:59 +01:00
Kyle Sanderson
50f1e4e7d5
build(ci): implement PGO (#1812)
* build(ci): implement pgo

Implement PGO (performance guided optimizations) for Go builds.
2024-11-16 23:57:41 +01:00
soup
7e5f65fd6e
chore(build): update workflows and go.mod to use latest patch version of Go (#1775)
* fix(ci): update workflow to use latest patch version of Go

* fix(ci): update all workflows to use latest patch version of Go

* chore(deps): bump Go version to latest patch in go.mod
2024-10-20 12:51:05 +02:00
Fabricio Silva
5fec9ac1b2
fix(build): do not create flat tarball for web-dist (#1757) 2024-10-07 16:01:35 +02:00
ze0s
1d68aec31e
build: upload web-dist to release assets on tag (#1731) 2024-09-18 09:36:00 +02:00
Fabricio Silva
c8e2fba334
fix(build): run web-dist tarball step for tags only (#1730)
* fix(build): run web-dist tarball step for tags only

* fix(build): create dist folder before running tar command
2024-09-17 15:58:33 +02:00
Fabricio Silva
e7f25cbe3b
build: add web/dist tarball (#1721)
* feat(release): add web-dist.tar.gz to releases

* feat(release): pass the directory to tar command instead
2024-09-17 15:13:15 +02:00
Kyle Sanderson
46b3ae8a0f
build(docker): add Windows images (#1640)
* feat(docker): add Windows images

* Create ciwindows.Dockerfile

* freddy?

* no it's camel

* have as many words with him as you like

* better go get more men

* an eye for an arm, ricky

* mcr.microsoft.com/windows/nanoserver:ltsc2022

* make a dime an hour for the company man

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2024-09-02 11:51:48 +02:00
Kyle Sanderson
f3c7946e52
chore(deps): update Go to 1.23 and Node to 20.17.0 (#1639)
* bump(deps): lift language versions

* Update Dockerfile

* ask your doctor

* chore: update go to 1.23

* fix: go mod version

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2024-09-01 17:10:18 +02:00
dependabot[bot]
c24f04f37c
build(deps): bump docker/build-push-action from 5 to 6 in the github group (#1582) 2024-06-25 14:42:56 +00:00
dependabot[bot]
0bd8c1d974
build(deps): bump goreleaser/goreleaser-action from 5 to 6 in the github group (#1573) 2024-06-18 12:33:38 +00:00
nuxen
f462d09afc
fix(ci): missing commit hash in docker builds (#1448) 2024-03-05 14:08:36 +01:00
ze0s
8156c8d66e
chore(deps): upgrade to Go v1.22 and deps (#1423)
* chore(deps): upgrade go to v1.22 and deps

* chore(deps): upgrade workflow go to v1.22
2024-02-22 14:33:50 +01:00
Kyle Sanderson
9db5a8b116
build(github): remove hard coded autobrr/autobrr (#1365)
* feat(ci): push to PRs image repository.

* always publish

* brand new eyes

* really.

* k. whatever

* .
2024-01-28 20:50:06 +01:00
ze0s
ab6f688fa6
build(docker): do not tag pre-release as latest (#1352) 2024-01-18 18:03:32 +01:00
Kyle Sanderson
f464e91e18
build(ci): disable ghcr push from forks (#1340) 2024-01-03 01:00:53 +01:00
ze0s
29ee22a213
build(ci): add Go test summary (#1341) 2024-01-02 23:20:24 +01:00
Kyle Sanderson
202030272f
build(ci): change goreleaser back to ubuntu runner (#1331)
* feat(ci): flip to windows 2019 from 2022

* it ended in a church?!

* shuttleworth? are you there

* build(release): remove windows step
2023-12-31 15:04:41 +01:00
dependabot[bot]
c060814022
build(deps): bump the github group with 4 updates (#1324) 2023-12-30 19:55:19 +00:00
Kyle Sanderson
6a94ecacca
refactor(http): auth handlers (#1311)
* fix(auth): implement invalid cookie handling

* that escalated quickly

* refactor(http): auth handlers

* add tests for auth handler
* refactor methods

* chore(tests): add header and build tag

* add build tag integration

* chore(tests): run in ci

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-12-28 02:04:25 +01:00
soup
4884fec89c
builds(ci): containers build additional architectures (#1265)
* refactor(dockerfile): optimize Docker builds

Combined multiple run commands into single statements in both main and CI dockerfiles, leveraging Docker's caching mechanism more effectively. This change aims to reduce image size and build time.

* hmm.

* Update ci.Dockerfile

* newline

* what about this

* three quorum members, three opinions

* true believer, right?

* when needed

* it sounds like music

* equals what

* really though, what?

* which one of you is the captain

* is that Kwejian whiskey

* ARG

* ARGH

* k.

* take me to your leader

* asd

* Update ci.Dockerfile

* try cache

* Revert

* Run Seperate platforms

* docker_build

* mother

* aggressive elephant

* leave me to my bath

* introduce buildx cache

* czechout manifests

* front left paw

* kill tags

* dealing with a child

* Update release.yml

* try outputs

* consolidation

* - =

* oxygen depleted

* where's the soup

* thanks buildx

* what's a little avx among friends

* Fine, I'll bring my own matches

* zenuuuu

* space, the final frontier

* but why

* ARE YOU HAPPY NOW

* link those binaries

* fast fail

* just the time killer you need

* add back generic arm

* ruthless dictator barbie

* kat

* build: docker add more labels

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-12-25 19:41:33 +01:00
Kyle Sanderson
95cd053db5
chore(build): update go and node (#1301)
* chore(build): sync go and node

* node20

* golang:1.20-alpine3.19

* 20.10.0-alpine3.19 golang:1.20-alpine3.19
2023-12-16 11:52:24 -08:00
dependabot[bot]
3d9e3f1cd0
build(deps): bump the github group with 3 updates (#1308) 2023-12-16 19:48:36 +00:00
dependabot[bot]
fef1af08c4
build(deps): bump the github group with 1 update (#1299) 2023-12-13 21:53:08 +00:00
Kyle Sanderson
76d749b301
build: build rpm and deb (#963)
* build: build rpm and deb

* Update .goreleaser.yml

* upload the formats.

* duplication...
2023-11-19 15:24:15 +01:00
KaiserBh
666bdf68cd
feat(database): setup integration tests (#1118)
* refactor: this should be Debug() just like the rest.

* feat: catch error when updating client table.

Before if we provided the wrong ID it will just say it's successful when it shouldn't.

* chore: handle the errors.

* fix: defer tx.Rollback().

When I try handling the error we always hit the error no matter what even though there wasn't any error, This is due that defer block being executed unconditionally so even after we commit it successfully it will just give error. So add checking then commit it if all good.

* feat: added testing env.

This way we can use in memory sqlite.

* chore: Delete log should be debug as well.

* feat: enable foreign keys for testing for sqlite.

I recommend enabling all together. Not sure why it's commented but for now will keep it the same and only enable for testing.

* chore: catch error, if deleting a record fails.

* chore: catch error, if deleting a record fails.

* chore: catch error, when failed to enable toggle.

* chore: catch error, if updating failed.

* chore(filter): catch error, if deleting failed.

* chore(filter): catch error, if row is not modified for ToggleEnabled.

* chore(feed): Should be debug level to match with others.

* chore(feed): catch error when nothing is updated.

* chore: update docker-compose.yml add test_db for postgres.

* chore(ci): update include postgres db service before running tests.

* feat(database): Added database testing.

* feat(database): Added api integration testing.

* feat(database): Added action integration testing.

* feat(database): Added download_client integration testing.

* feat(database): Added filter integration testing.

* test(database): initial tests model (WIP)

* chore(feed): handle error when nothing is deleted.

* tests(feed): added delete testing.

* chore(feed): handle error when nothing is updated.

* chore(feed): handle error when nothing is updated.

* chore(feed): handle error when nothing is updated.

* feat(database): Added feed integration testing.

* fix(feed_cache): This should be time.Time not time.Duration.

* chore(feed_cache): handle error when deleting fails.

* feat(database): Added feed_cache integration testing.

* chore: add EOL

* feat: added indexer_test.go

* feat: added mock irc data

* fix: the column is not pass anymore it's password.

* chore: added assertion.

* fix: This is password column not pass test is failing because of it.

* feat: added tests cases for irc.

* feat: added test cases for release.

* feat: added test cases for notifications.

* feat: added Delete to the User DB that way it can be used for testing.

* feat: added user database tests.

* refactor: Make setupLogger and setupDatabase private also renamed them.

Changed the visibility of `setupLogger` to private based on feedback. Also renamed the function to `setupLoggerForTest` and `setupDatabaseForTest` to make its purpose more descriptive.

* fix(database): tests postgres ssl mode disable

* refactor(database): setup and teardown

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-11-18 20:04:30 +01:00
dependabot[bot]
69f7cce116
build(deps): bump the github group with 1 update (#1223) 2023-10-28 10:02:05 +00:00
dependabot[bot]
816753f0da
build(deps): bump the github group with 6 updates (#1124) 2023-09-19 16:19:57 +00:00
ze0s
93f96e9758
ci(docker): change docker metadata tag to {{raw}} from {{version}} (#1115)
ci(docker): change docker tag to raw

* version was missing the v prefix
2023-09-11 21:18:12 +02:00
Fabricio Silva
996519cbae
ci: fix docker metadata to parse semver tags (#1110)
ci: fix docker metadata to parse semVer tags
2023-09-11 13:09:48 +02:00
dependabot[bot]
087471a1f7
build(deps): bump the github group with 1 update (#1091) 2023-09-09 10:33:56 +00:00
Kyle Sanderson
3d64ed150a
ci: goreleaser lower parallelism to mitigate OOM issues (#1086)
ci: clamp parallelism to reality
2023-09-07 23:52:37 +02:00
Kyle Sanderson
b3957ac447
ci: build Goreleaser binaries on windows (#1040)
try windows again
2023-09-03 15:48:31 +02:00
dependabot[bot]
dc8ad9c813
build(deps): bump the chore-dependabot-github group with 1 update (#1032)
Bumps the chore-dependabot-github group with 1 update: [docker/build-push-action](https://github.com/docker/build-push-action).

- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: chore-dependabot-github
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-07 00:25:11 +02:00
Kyle Sanderson
daa4bf9a0f
chore(deps): update build and packages (#1009)
* chore: update golang deps

* bump node and golang

* update node

* tell that to mel gibson.

* build: update go version

* chore: update deps

* chore: go mod tidy

---------

Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com>
2023-07-21 18:00:03 +02:00
Kyle Sanderson
b1eae6e980
build: goreleaser parallel builds (#956)
* chore(goreleaser): parallel builds

* 8 seems like a good number

* 99 problems but a goreleaser... is one.

* fine?

* fine.

* Update release.yml

* Windows??

* bill

* flip to zip on Windows

* 4 minutes to zstd on windows... mac should be faster.

* long switch for clarity

* revert none hack

* flip web to mac

* bad touch

* mac web is a loss

* add zip
2023-05-24 12:56:12 +02:00
Fabricio Silva
1f76aa38f4
build(web): use pnpm from corepack (#935)
* feat(web): use pnpm packageManager on package.json

* build(web): add frozen-lockfile to Makefile

* build(docker): use the same node version as Docker image

* build(docker): enable corepack

* build(makefile): use --dir instead of cd for pnpm
2023-05-21 17:05:53 +02:00
Kyle Sanderson
762a0bb36b
chore(build): change to pnpm from yarn (#919)
* flip to npm

* try pnpm

* nothing good started with p anyway

* I want to go outside.

* Split out deps and build

* 30 seconds on the fetch, reintroduce the p

* lock it in

* flip lock file to pnpm

* nuke yarn.lock

* kirby no longer has yarn

* flip goreleaser to v4, was using node12.

* snapshots don't have tags

* Update README.md

* pin offline dockerfile

* Delete .yarnrc.yml

* Delete web/.yarn directory

* fix: update scripts

---------

Co-authored-by: ze0s <ze0s@riseup.net>
2023-05-08 20:28:43 +02:00
ze0s
fbdeedc74c
build(ci): goreleaser optimize uploads (#896)
ci: optimize uploads
2023-05-01 15:13:57 +02:00
ze0s
6e5385a490
refactor(web): replace pkg react-query with tanstack/react-query (#868)
* refactor: move to tanstack/react-query and fix cache

* refactor(releases): move to tanstack/react-query

* refactor(logs): move to tanstack/react-query

* refactor(base): move to tanstack/react-query

* refactor(base): move to tanstack/react-query

* refactor(dashboard): move to tanstack/react-query

* refactor(auth): move to tanstack/react-query

* refactor(filters): move to tanstack/react-query

* refactor(settings): move to tanstack/react-query

* chore(pkg): add tanstack/react-query

* refactor(filters): move to tanstack/react-query

* refactor: move to tanstack/react-query

* refactor: invalidate queries

* chore(pkg): remove old react-query

* chore: change imports to root prefixes

* build: remove needs web from test

* set enableReinitialize to true to fix formik caching issues

* fix all property for apiKeys const

* fix toast when enabling/disabling feed

---------

Co-authored-by: martylukyy <35452459+martylukyy@users.noreply.github.com>
2023-04-27 21:26:27 +02:00
Kyle Sanderson
0be92bef65
build: only push docker images for autobrr org (#873)
* build: speculative fix for develop push

* 🐝

* 🦀
2023-04-27 11:42:36 +02:00
Kyle Sanderson
7cbcc2e14c
build: do not push container images from forks (#869)
* fix(prs): don't push if not sourced from autobrr org

* when literals are strings, and strings are nothing.

* some say the beginning is like the end.

* Update release.yml?

* Update release.yml

* 🍺
2023-04-23 18:06:52 +02:00
Kyle Sanderson
d546288c2a
build: make ci 2-3x faster (#859)
* Create scratch.Dockerfile

* "best practices"

* even faster?

* too fast. change outdir

* flip to 1.20.3 + v4 + setup go on docker

* download deps

* debug

* Update ci.Dockerfile

* Update goreleaser.Dockerfile

* enable web caching

* Update release.yml

* Update ci.Dockerfile

* revert goreleaser

* cleanup

* set GOCACHE

* Update ci.Dockerfile

* Delete scratch.Dockerfile
2023-04-23 01:48:25 +02:00
KaiserBh
1cdbbe5bf3
refactor(web): migrate create-react-app to vite (#823)
* fix(build): dockerignore add exclusions

* fix: baseurl and build

* chore: removed react-app-env instead use vite

* chore: updated server and embedding static files.

* commented because conflict I believe, and not needed.

* docs: updated readme

* chore: updated json and added vite

* chore: import fix

* chore: updated yarn.lock and package json

* build: add empty dist to compile backend

* fix: use / as default baseurl

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-10 14:28:24 +02:00
ze0s
33897b04a1
Revert #787 (#821)
Revert "refactor(web): migrate create-react-app to vite (#787)"

This reverts commit edae1bbf4b.
2023-04-07 19:08:42 +02:00
KaiserBh
edae1bbf4b
refactor(web): migrate create-react-app to vite (#787)
* removed react-app type instead use vite.

* removed index.html from public since vite uses it from root: read more: https://vitejs.dev/guide/#index-html-and-project-root

* yarn.lock update.

* added vite config file. With commented rollUp option if we want the build to be called build but using default stuff for now.

* updated tsconfig to use vite and include vite.config.ts

* changed package json build commands to use vite.

* for some reason there is an error in vite config when we put project as tsconfig.json.

* build.go updated to use the new dist folder.

* refactored as well updated to use dist and web.AssetHandler again.

* Fixed issue forcing the frontend to be reloaded for all routes to work if logged in fresh without reloading it will always go back to dashboard.

* updated it to use the new function; need to fix the Index for baseUrl I believe, if enabled it works except logs route will crash due to cors.

* refactored and default port to 7474, don't think we need the rollUpOptions.

* added tmp/ to ignore .

* init air.toml, for dev hot reloading both app and backend. https://github.com/cosmtrek/air run it using air but make sure it's in PATH

* updated the start command to build and watch for changes, works great with air.

* revert

* added proxy for vite config. To be used for dev.

* refactor: I think this should fix it, when logs route etc getting accessed usually it throws error but by getting rid of the catch-all it should work as intended, since web.RegisterHandler(r) will catch the unmatched ones.

* fix: baseurl and build

* fix(build): docker ignore !web/dist

* fix(build): dockerignore add exclusions

* docs: update README.md

* build: update postcss config

---------

Co-authored-by: KaiserBh <kaiserbh@proton.me>
Co-authored-by: ze0s <ze0s@riseup.net>
2023-04-07 16:04:10 +02:00