summaryrefslogtreecommitdiffstats
path: root/modules/public
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-01-07 10:33:17 +0800
committerGitHub <noreply@github.com>2022-01-06 21:33:17 -0500
commita1c12fb0b3a88e21e4c8c8f29c13e63cf4bc38dd (patch)
tree7add88555600d96deecbc9f97217d183f83f3edc /modules/public
parent21ed4fd8da4c8992518dcfb01aa7306f7406f735 (diff)
downloadgitea-a1c12fb0b3a88e21e4c8c8f29c13e63cf4bc38dd.tar.gz
gitea-a1c12fb0b3a88e21e4c8c8f29c13e63cf4bc38dd.zip
Don't store assets modified time into generated files (#18193)
Diffstat (limited to 'modules/public')
-rw-r--r--modules/public/public_bindata.go2
-rw-r--r--modules/public/static.go6
2 files changed, 7 insertions, 1 deletions
diff --git a/modules/public/public_bindata.go b/modules/public/public_bindata.go
index eb10d96426..c5485b7cc0 100644
--- a/modules/public/public_bindata.go
+++ b/modules/public/public_bindata.go
@@ -7,4 +7,4 @@
package public
-//go:generate go run -mod=vendor ../../build/generate-bindata.go ../../public public bindata.go
+//go:generate go run -mod=vendor ../../build/generate-bindata.go ../../public public bindata.go true
diff --git a/modules/public/static.go b/modules/public/static.go
index 32ba0fe258..2e35329a07 100644
--- a/modules/public/static.go
+++ b/modules/public/static.go
@@ -18,8 +18,14 @@ import (
"time"
"code.gitea.io/gitea/modules/log"
+ "code.gitea.io/gitea/modules/timeutil"
)
+// GlobalModTime provide a gloabl mod time for embedded asset files
+func GlobalModTime(filename string) time.Time {
+ return timeutil.GetExecutableModTime()
+}
+
func fileSystem(dir string) http.FileSystem {
return Assets
}