1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/discourse_ynh.git synced 2024-09-03 18:26:18 +02:00
discourse_ynh/sources/patches/main-4-fix-missing-git-repository.patch

32 lines
1,022 B
Diff
Raw Normal View History

2024-08-30 11:55:29 +02:00
From 17a2d3241889c117ac5bb15d0609837592b16cb3 Mon Sep 17 00:00:00 2001
2024-07-26 14:21:38 +02:00
From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= <felix@piedallu.me>
2024-08-30 11:55:29 +02:00
Date: Fri, 30 Aug 2024 11:50:04 +0200
Subject: [PATCH] Fix missing git commands in repository
2024-07-26 14:21:38 +02:00
---
2024-08-30 11:55:29 +02:00
lib/git_utils.rb | 5 +++--
2024-07-26 14:21:38 +02:00
1 file changed, 3 insertions(+), 2 deletions(-)
2024-08-30 11:55:29 +02:00
diff --git a/lib/git_utils.rb b/lib/git_utils.rb
index fb664fe2..aa81fd2d 100644
--- a/lib/git_utils.rb
+++ b/lib/git_utils.rb
@@ -11,12 +11,13 @@ class GitUtils
2019-06-25 21:22:10 +02:00
end
2024-07-26 14:21:38 +02:00
2024-08-30 11:55:29 +02:00
def self.full_version
- self.try_git('git describe --dirty --match "v[0-9]*" 2> /dev/null', "unknown")
+ self.try_git('git describe --dirty --match "v[0-9]*" 2> /dev/null', Discourse::VERSION::STRING)
2019-07-26 09:17:23 +02:00
end
2024-08-30 11:55:29 +02:00
def self.last_commit_date
git_cmd = 'git log -1 --format="%ct"'
- seconds = self.try_git(git_cmd, nil)
+ # Note(decentral1se): Output from actual command in the v3.2.4 branch
+ seconds = self.try_git(git_cmd, '1721046633')
seconds.nil? ? nil : DateTime.strptime(seconds, "%s")
end
2024-07-26 14:21:38 +02:00
--
2024-08-30 11:55:29 +02:00
2.43.0