summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaltycrys <73420320+saltycrys@users.noreply.github.com>2020-12-04 01:58:27 +0100
committersaltycrys <73420320+saltycrys@users.noreply.github.com>2020-12-04 01:58:27 +0100
commitadccca366e12a32fd96859d6f279b83a25f02479 (patch)
tree4f7387e1eae164eb476ca9248ae348968713c3f1
parentcc684ff0b1bfb358f5ef567865e23a532b168132 (diff)
downloadinvidious-adccca366e12a32fd96859d6f279b83a25f02479.tar.gz
invidious-adccca366e12a32fd96859d6f279b83a25f02479.tar.bz2
invidious-adccca366e12a32fd96859d6f279b83a25f02479.zip
Fix invidious version for old git versions
The `%cs` format was only added to git in version 2.25 while `%ci` has been around forever.
-rw-r--r--src/invidious.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious.cr b/src/invidious.cr
index 767a8748..0e8c2324 100644
--- a/src/invidious.cr
+++ b/src/invidious.cr
@@ -64,7 +64,7 @@ HTTP_CHUNK_SIZE = 10485760 # ~10MB
CURRENT_BRANCH = {{ "#{`git branch | sed -n '/* /s///p'`.strip}" }}
CURRENT_COMMIT = {{ "#{`git rev-list HEAD --max-count=1 --abbrev-commit`.strip}" }}
-CURRENT_VERSION = {{ "#{`git log -1 --format=%cs | sed s/-/./g`.strip}" }}
+CURRENT_VERSION = {{ "#{`git log -1 --format=%ci | date -I -f - | sed s/-/./g`.strip}" }}
# This is used to determine the `?v=` on the end of file URLs (for cache busting). We
# only need to expire modified assets, so we can use this to find the last commit that changes