Commit graph

202 commits

Author SHA1 Message Date
Deluan
4156602158 build(ci): show English names for changed languages in POEditor PRs
Signed-off-by: Deluan <deluan@navidrome.org>
2025-03-07 12:12:44 -05:00
Deluan
0bebd396df build(ci): use the head commit sha in PR versions
Ref: https://stackoverflow.com/a/68068674
Signed-off-by: Deluan <deluan@navidrome.org>
2024-12-21 20:21:13 -05:00
Deluan
0b18489327 build(poeditor): change commit message for translation update PRs
Signed-off-by: Deluan <deluan@navidrome.org>
2024-12-21 17:54:20 -05:00
Deluan Quintão
d4dc8180a2
build(ci): fix release version label and package names (#3573)
* fix(ci): fix snapshot label

Signed-off-by: Deluan <deluan@navidrome.org>

* fix(ci): fix package names

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2024-12-21 13:36:22 -05:00
Deluan Quintão
851f54ea57
fix(ci): fix linux packages upload (#3569)
Signed-off-by: Deluan <deluan@navidrome.org>
2024-12-20 23:38:28 -05:00
Deluan Quintão
c11fd9ce28
feat(ci): add updated language names to the POEditor PR title (#3566)
* refactor(ci): add updated languages to the POEditor PR title

Signed-off-by: Deluan <deluan@navidrome.org>

* refactor(ci): add an author to the PR

Signed-off-by: Deluan <deluan@navidrome.org>

---------

Signed-off-by: Deluan <deluan@navidrome.org>
2024-12-20 18:46:00 -05:00
Kendall Garner
154e13f7c9
build: add packages for deb and rpm to release (#3202)
* support packing deb/rpm/archlinux

* .-.

* initial test

* fix postinstall, remove execstop

* bash -> sh, create toml manually if it doesn't exist (thanks debian)

* don't forget that newline

* postrm

* comments, contrib -> packaging/linux

* contrib > packaging in .goreleaser

* actually add toml

* openrc/sysv templates

* add apk. nothing else yet

* wait, we have a ntive uninstall

* fix: merge errors, move packaging to release

* chore: remove old goreleaser conf

* ci: remove `release` dependency on `docker push`

* ci: fix release version

* ci: upload packages

* ci: try to fix json file list

* ci: replace the json file list with a txt artifact

* postremove -> preremove, skip install/remove error

* actually do preremove

* better preremove

* ci: fix

* ci: fix?

* ci: clean-up

* ci: try to change labels and filenames

* ci: fix?

* ci: fix?

* ci: add `make package` target

* ci: make labels more readable

hope it doesn't break the pipeline again

* build: remove alpine and archlinux packages, for now.

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-26 13:31:45 -04:00
Deluan Quintão
69e2a6d620
build(netgo): make sure the project is always compiled with netgo build tag (#3428)
* build(netgo): make sure the project is always compiled with `netgo` build tag

* docs(netgo): better comments
2024-10-26 13:28:23 -04:00
Rob Emery
9c3b456165
feat(build): MSI installer improvements (#3376)
* feat(build): add a make target to build a msi installer locally

* Testing wrapping the executable in cmd

* build(ci): build msis in parallel

* feat(server): add LogFile config option

* Revert "Testing wrapping the executable in cmd"

This reverts commit be29592254.

* Adding --log-file for service executable

* feat(ini): wip

* feat(ini): parse nested ini section

* fix(conf): fix fatal error messages

* Now navidrome supports INI, we can use the built-in msi ini system
and not require the VBScript to convert it into toml

* File needs to be called .ini to be parsed as an INI and correct filename
needs to be passed to the service

* fix(msi): build msi locally

* fix(msi): pipeline

* fix(msi): pipeline

* fix(msi): pipeline

* fix(msi): pipeline

* fix(msi): pipeline

* fix(msi): Makefile

* fix(msi): more clean up

* fix(log): convert LF to CRLF on Windows

* fix(msi): config filename should be case-insensitive

* fix(msi): make it a little more idiomatic

* Including the latest windows release of ffmpeg into the msi
as built by https://www.gyan.dev/ffmpeg/builds/ (linked
to on the official ffmpeg source)

* This should version independent

* Need bash expansion for the * to work

* This will run twice, once for x86 and once for x64, I'll make it cache
the executable for now as it'll be quicker

* Silencing wget

* Add ffmpeg path to the config so Navidrome knows where to find it

* refactor: download ffmpeg from our repository

* When going back from the "Are you ready to install?" it should go back to the
Settings dialogue that you just came from

* fix: comments

---------

Co-authored-by: Deluan <deluan@navidrome.org>
2024-10-22 19:32:56 -04:00
Deluan
270ae3549d chore(deps): bump peter-evans/create-pull-request from 6 to 7 2024-10-16 20:31:45 -04:00
Deluan Quintão
00c6a0ed1f
fix: use target platform to build final image (#3397)
* fix: use target platform to build final image

* fix: remove armv5 from supported images
2024-10-15 22:47:05 -04:00
Deluan Quintão
943b456d3f
fix: do not try to push to ghcr.io without proper permissions (#3395) 2024-10-15 19:10:44 -04:00
Deluan Quintão
ae6499b941
fix: PRs should not try to push to docker (#3393) 2024-10-15 18:28:27 -04:00
Deluan Quintão
214287e00d
build: new pipeline, new way to cross-compile and build docker images locally. (#3388)
* build: new pipeline, new way to cross-compile and build docker images locally. (#3383)

* build: use alternative repositories

* build: fix

* build: validate taglib downloads

* build: control concurrency

* build: validate xx version

* build: remove taglib download validation as the version can be changed as an argument.
2024-10-15 16:46:01 -04:00
Deluan
af1add4312 Revert "build: new pipeline, new way to cross-compile and build docker images locally. (#3383)"
This reverts commit b14c790641.
2024-10-14 18:52:02 -04:00
Deluan Quintão
b14c790641
build: new pipeline, new way to cross-compile and build docker images locally. (#3383)
* refactor(ci): faster pipeline, add support for darwin/arm64 (#26)

* feat: WIP

* feat: WIP - all except windows

* fix: Bump crazymax/osxcross to 14.5

* feat: bundle UI

* fix: works on all 10!

* fix: WIP

* fix: add git sha and tag

* fix: download taglib from cross-taglib

* feat: add more dependabot coverage

* feat: build JS bundle using Docker

* refactor: pipeline

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: wip

* fix: real

* fix: no container

* fix: no container

* fix: pkg-config

* fix: pkg-config

* fix: pkg-config

* fix: pkg-config

* fix: pkg-config

* fix: add lint

* fix: add lint

* fix: add lint

* fix: add lint

* fix: add lint

* fix: add lint

* fix: add js

* fix: gittags

* fix: gittags

* test: is_release

* test: is_release

* test: is_release

* test: push image

* test: push image

* test: push image

* test: push image

* test: push image

* test: push image

* test: push image

* test: push image

* test: push image

* fix: extract download taglib action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: extract prepare docker action

* fix: add msi

* fix: add msi

* fix: add msi

* fix: add msi

* fix: add msi

* test: full

* test: full

* test: disable some platforms to avoid hitting the rate limit

* test: disable some platforms to avoid hitting the rate limit

* fix: use ecr.aws for base images

* test: full release

* test: full release

* fix: clean-up

* refactor: pipeline clean-up (#32)

* fix: clean-up

* fix: clean-up

* fix: clean-up

* fix: fetch all tags

* fix: version

* fix: version

* fix: no need to setup QEMU

* fix: don't try to push images in unauthorized branches

* fix: check push enabled

* fix: change layout?
2024-10-14 18:41:19 -04:00
Deluan
d9fa19dab3 build(ci): bump goreleaser to 2.3.2 2024-10-06 13:20:31 -04:00
Rob Emery
768160b05e
feat: Windows MSI installer and service support (#3125)
* First version/rough layout of the required wix to build an MSI that embeds everything

* Don't need revision number

* produced exe from existing build process is navidrome not Navidrome

* Adding Kardianos wrapper around Cobra so the callbacks are handled
automatically (this is basically only for windows)

* Adding pointless check to shut up lint for now

* make format

* Revert disabling npm tidy

* Using Kardianos always will result in the application hanging so it
needs only be wrapped to handle the callbacks if it's being used in
the service context, otherwise use cobra directly

* Copying in service installation etc from https://github.com/navidrome/navidrome/pull/2295

* Under Linux this installs a user service (I don't think this is
correct, but lets get this working first). User units/services
cannot depends on system units, so previously this bombed out
with Exit Code 5.

* Under Windows we can install both the x86 and x64 builds, they
will install to different folders, but previously they would
overwrite the service as they were both called Navidrome. Now,
it will install 2 services. This will still be weird/broken as
they will attempt to listen on the same port, however uninstalling
the "wrong" arch will not cause the "right" one to be partially
uninstalled anymore

* Reverting changes to the context as they don't really seem necessary anyway

* Need to consistently name the service

* Fixing broken context

* The included files should be removed when the app is uninstalled

* Reverting back to the original context here, I don't think
it makes any difference to running under kardianos

* Let's see what we have immediately available

* OK, the build takes ages so let's just try and do the whole thing in one go, maybe we'll get lucky

* Need -r on directory copy, plus we'll probably need to install wixl

* No sudo cmd, so I assume this runs as root

* WORKSPACE!

* Moving the version to be a single variable, we'll probably be able to pull it from the github tag or whatever

* Might as well put the msi in the right folder, it's tidier

* Writing the version number into the msi, from the output of goreleaser

* Using jq to parse the goreleaser metadata, so need to install it

* MSI only supports numerical version numbers, so I'll make the "snapshot" version .1 minor patch greater

* -r or --raw (on newer versions) means we don't get the "" around the value

* Running as a user service I think makes limited sense for this

* Will now ask for configuration settings during install.

MSI/WiX only supports writing out INI files, Toml is almost
INI compatable, except that the INI needs to write out a section
first, so we need to have a script to strip that off.

We are forced to display a License.rtf file by the UI so I think
the build process should probably rename the default licence file
and that will suffice.

Uninstalling works cleanly, howvever upgrades seem to leave the old
version installed in "programs and features" currently.

Adding the UI has introduced a requirement for WiX 0.103

* Updating the build to include --ext ui for the new config ui

* Configuration dialog should not display for upgrades as the config file
is already written

* Making description consistent with the systemd service and making
the build process produce the required License.rtf

* Fixing " non-constant format string in call to fmt.Errorf (govet)"

* Its a string, not an int; read better.

* Wixl 103 is required for --ext ui, so we need 24.04

* OK this is still installing Wix 0.101, maybe it all needs to be 24.04?

* Switching the builds back to ubuntu-latest (22.04 at current)
as it runs on a custom container, it's actually debian anyway
Moving msi build into its own job so it can run on 24.04 so
we have access to wixl 0.103 for --ext ui support

* Forcing build

* Whitespace fix

* Adding sudo I guess

* Gotta checkout as well

* Adding debugging for when there's soemthing wrong with the paths

* Adding more ls to see if the output has worked

* The msi's are in subdirs

* Actually they're in the ./wix directory

* Still can't find these msi's?

* I think that was being treated literally previously

* No idea why this isn't working, give it a relative path instead?

* Making explicit on the dialogue that the configuration file will be
where the installation dir is

* The lint keeps failing and it's just getting in the way so I'll
turn this off for now and we'll edit out this commit from the merge

* Cutting more out of the build to get more stuff out of the way

* Need to increase the width to fit the text in

* Calling everything License.rtf, presumably one of them is correct

* I am pretty sure the License.rtf loading is broken under Wixl; so
let's just bypass the EULA from the UI which is a nicer experience
for the users anyway

* This needs to be after WelcomeDlg now the Eula isn't displayed

* You're supposed to be able to use <WixVariable> to override the
location that the bmp's are loaded from, I can't get this to work
under wixl so I'm guessing given that the ui extension is new, it
hasn't been implemented with that in mind. So we'll hack it by
overwriting the files installed with the package.

* We should make this less brittle so when wixl is updated it still works

* Re-enabling the lint and tests etc

* Improving the scaling quality and removing borders from images to
tidy them up a tad

* Pretty sure this isn't necessary as MY_PROPERTY will always be false

* Without publishing this event, we can't continue to the next dialogue
however I think we should be able to get away without the property

* Refactoring out the duplication so we only have one service
defined and we can run that either way

* Pushing the Interactive check into the root commmand? Feels like it
is probably getting closer to the right place at least

* go tidy

* OK this didn't work under windows, I'm guessing it's because
it's lacking all the metadata about the service it needs to
report back to Windows on.

* We need to run service execute now so that the windows
service will behave (hopefully)!

* Lint

* go tidy

* Renaming service to "navidrome" rather than "Navidrome" as this
is the filename that systemd writes and it's unusual to have
capital letters in service names under Linux.
Switching to use service execute for Linux to mirror Windows

* Need to provide the arguments to append

* Without passing the context around, the DB isn't closed gracefully
so we end up with with .db-shm and .db-wal files for recovery

* We should log fatal rather than outputting directly to stdout

* go tidy

* refactor: small nitpicks

* fix: terminate service gracefully

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2024-10-01 19:40:53 -04:00
dependabot[bot]
6040a50297
chore(deps): bump alpine from 3.18 to 3.20 in /.github/workflows (#3326)
Bumps alpine from 3.18 to 3.20.

---
updated-dependencies:
- dependency-name: alpine
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-28 11:30:36 -04:00
Deluan
9e5849e4dc build(dependabot): add docker configuration 2024-09-28 10:52:23 -04:00
Deluan Quintão
3910e77a7a
build(ci): change GitHub release notes (#3300) 2024-09-21 17:00:13 -04:00
Deluan
d0784b6a21 chore(ci): change "update translations" PR title 2024-09-19 17:28:01 -04:00
Deluan
a132755d67 Move update-translations.sh script to workflow directory 2024-09-14 21:37:25 -04:00
Deluan Quintão
68ddbf4856
Add i18n lint job 2024-08-31 14:54:04 -04:00
Deluan Quintão
bc06a59919
Upgrade TagLib 2.0.2, GoReleaser 2.2.0 (#3217)
* Upgrade ci-goreleaser

* Fix tests

* Fix taglib lib path in macOS
2024-08-28 19:13:08 -04:00
Deluan
a9feeac793 Revert "Always run docker steps (#3034)"
This reverts commit 5d41165b5b.
2024-05-18 11:54:16 -04:00
Deluan
1c0551f4f7 Revert "Fix docker publishing for PRs"
This reverts commit 15c9a0ded3.
2024-05-18 11:54:15 -04:00
Deluan
15c9a0ded3 Fix docker publishing for PRs 2024-05-17 22:45:54 -04:00
Deluan Quintão
5d41165b5b
Always run docker steps (#3034) 2024-05-17 22:22:47 -04:00
Deluan
78f554721a Revert "Add download link to PR" workflow 2024-05-11 20:40:12 -04:00
Deluan
56809419c2 Fix "Add download link to PR" workflow 2024-05-11 18:50:46 -04:00
Deluan
80e68dfbcd Bump actions/github-script to v7 2024-05-10 16:00:21 -04:00
Deluan
a9c745839b Bump actions/stale and dessant/lock-threads versions 2024-05-10 15:51:16 -04:00
Deluan
00cbe4c357 Update Go to 1.22.3 2024-05-09 22:26:15 -04:00
Ludovic Fernandez
4d29184998
Improves golangci-lint configuration and workflow (#3004)
* chore: the default Go version is based on the go.mod

* chore: use linter configuration instead of exclude-rules

* chore: update workflow
2024-05-07 18:52:26 -04:00
Deluan
2470471b2b Pin golangci-lint-action version as a workaround to fix the pipeline.
See https://github.com/golangci/golangci-lint/issues/4695
2024-05-06 21:53:47 +02:00
Deluan Quintão
d9cd5efd67
Bump Go dependencies (#2976)
* Fix build

* Bump dependencies
2024-04-26 18:21:10 -04:00
Deluan
ca005f6457 Include MPV in release Docker image. Refers to #2910 2024-04-21 21:02:36 -04:00
Deluan Quintão
de7f553526
Update Go to 1.22.2 and TagLib to 2.0.1 (#2946) 2024-04-09 19:00:38 -04:00
Deluan
e81bf5125f Bump actions versions 2024-04-02 19:37:59 -04:00
Deluan
6eb13c9f79 Run Test job in ci-goreleaser container 2024-02-18 12:52:06 -05:00
Deluan
6f4c55dbde Use new ci-goreleaser (with TagLib 2) 2024-02-18 12:52:06 -05:00
Deluan Quintão
7167e5ac87
Upgrade to Go 1.22 and Node v20 (#2861)
* Remove workaround for missing `context.WithoutCancel` in Go 1.20

* Upgrade to Go 1.22

* Upgrade GitHub Actions

* Upgrade Node to v20
2024-02-16 20:29:16 -05:00
Kendall Garner
814161d78d
Add OS Lyrics extension (#2656)
* draft commit

* time to fight pipeline

* round 2 changes

* remove unnecessary line

* fight taglib. again

* make taglib work again???

* add id3 tags

* taglib 1.12 vs 1.13

* use int instead for windows

* store as json now

* add migration, more tests

* support repeated line, multiline

* fix ms and support .m, .mm, .mmm

* address some concerns, make cpp a bit safer

* separate responses from model

* remove [:]

* Add trace log

* Try to unblock pipeline

* Fix merge errors

* Fix SIGSEGV error (proper handling of empty frames)

* Add fallback artist/title to structured lyrics

* Rename conflicting named vars

* Fix tests

* Do we still need ffmpeg in the pipeline?

* Revert "Do we still need ffmpeg in the pipeline?"

Yes we do.

This reverts commit 87df7f6df7.

* Does this passes now, with a newer ffmpeg version?

* Revert "Does this passes now, with a newer ffmpeg version?"

No, it does not :(

This reverts commit 372eb4b0ae.

* My OCD made me do it :P

---------

Co-authored-by: Deluan Quintão <deluan@navidrome.org>
2023-12-27 20:20:29 -05:00
Deluan Quintão
781ff40464
Bump Go version to 1.21.5 (#2729) 2023-12-20 20:02:40 -05:00
Deluan
c3efc57259 Use TagLib 1.13.1 for snapshots/releases 2023-11-24 20:35:38 -05:00
Deluan
27a92b05e7 Fixed deprecated GoReleaser options 2023-11-24 18:08:34 -05:00
Deluan
069da5d91c Bump Go to 1.21.4 2023-11-24 17:51:36 -05:00
Deluan
53607fe114 Publish all new images to Docker Registry 2023-11-16 23:21:20 -05:00
Deluan Quintão
f941347cf1
Upgrade to Go 1.21 (#2475)
* Upgrade to Go 1.21

* Remove 'replacements' from goreleaser config
2023-08-09 11:39:49 -04:00