From 96cfe578446b6e32ba565a104d9c6b8f4be62678 Mon Sep 17 00:00:00 2001 From: John Rodewald Date: Sun, 26 Nov 2023 14:21:35 +0100 Subject: [PATCH] codeberg-pages: 4.6.2 -> 5.0 --- .../continuous-integration/codeberg-pages/default.nix | 8 ++++---- .../codeberg-pages/disable_httptest.patch | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pkgs/development/tools/continuous-integration/codeberg-pages/default.nix b/pkgs/development/tools/continuous-integration/codeberg-pages/default.nix index d252266f2377..c9ec0cc84ad4 100644 --- a/pkgs/development/tools/continuous-integration/codeberg-pages/default.nix +++ b/pkgs/development/tools/continuous-integration/codeberg-pages/default.nix @@ -2,17 +2,17 @@ buildGoModule rec { pname = "codeberg-pages"; - version = "4.6.2"; + version = "5.0"; src = fetchFromGitea { domain = "codeberg.org"; owner = "Codeberg"; repo = "pages-server"; - rev = "ce241fa40adee2b12f8e225db98e09a45bc2acbb"; - sha256 = "sha256-mL2Xs7eyldoZK4zrX6WFlFtwdLN0iVyl1Qh8X6b2u9c="; + rev = "ea68a82cd22a8a8c1f265260af22b9406f13e3a9"; + hash = "sha256-TSXRB0oq1CtHC9ooO+Y3ICS5YE+q+ivZAcYBSd1oWi0="; }; - vendorHash = "sha256-R/LuZkA2xHmu7SO3BVyK1C6n9U+pYn50kNkyLltn2ng="; + vendorHash = "sha256-vTYB3ka34VooN2Wh/Rcj+2S1qAsA2a/VtXlILn1W7oU="; patches = [ ./disable_httptest.patch ]; diff --git a/pkgs/development/tools/continuous-integration/codeberg-pages/disable_httptest.patch b/pkgs/development/tools/continuous-integration/codeberg-pages/disable_httptest.patch index 2095b603badc..90c815712d38 100644 --- a/pkgs/development/tools/continuous-integration/codeberg-pages/disable_httptest.patch +++ b/pkgs/development/tools/continuous-integration/codeberg-pages/disable_httptest.patch @@ -1,12 +1,13 @@ diff --git a/server/handler/handler_test.go b/server/handler/handler_test.go deleted file mode 100644 -index 626564a..0000000 +index 6521633..0000000 --- a/server/handler/handler_test.go +++ /dev/null -@@ -1,49 +0,0 @@ +@@ -1,52 +0,0 @@ -package handler - -import ( +- "net/http" - "net/http/httptest" - "testing" - "time" @@ -24,13 +25,15 @@ index 626564a..0000000 - "https://docs.codeberg.org/pages/raw-content/", - []string{"/.well-known/acme-challenge/"}, - []string{"raw.codeberg.org", "fonts.codeberg.org", "design.codeberg.org"}, +- []string{"pages"}, +- cache.NewKeyValueCache(), - cache.NewKeyValueCache(), - cache.NewKeyValueCache(), - ) - - testCase := func(uri string, status int) { - t.Run(uri, func(t *testing.T) { -- req := httptest.NewRequest("GET", uri, nil) +- req := httptest.NewRequest("GET", uri, http.NoBody) - w := httptest.NewRecorder() - - log.Printf("Start: %v\n", time.Now())