1
0
Fork 0

Adding upstream version 0.8.13.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-29 07:17:59 +02:00
parent c0c4addb85
commit 6819b9812e
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
28 changed files with 556 additions and 76 deletions

View file

@ -14,5 +14,11 @@ func DocsURL(path string) string {
path = path[1:]
}
return fmt.Sprintf("https://nicholas-fedor.github.io/shoutrrr/%s/%s", meta.DocsVersion, path)
// Use commit for dev builds, version for releases
version := meta.GetVersion()
if version == "unknown" || version == "dev" {
version = meta.GetCommit()
}
return fmt.Sprintf("https://nicholas-fedor.github.io/shoutrrr/%s/%s", version, path)
}

View file

@ -92,7 +92,7 @@ var _ = ginkgo.Describe("the util package", func() {
ginkgo.It("should return the expected URL", func() {
expectedBase := fmt.Sprintf(
`https://nicholas-fedor.github.io/shoutrrr/%s/`,
meta.DocsVersion,
meta.GetVersion(),
)
gomega.Expect(util.DocsURL(``)).To(gomega.Equal(expectedBase))
gomega.Expect(util.DocsURL(`services/logger`)).