mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-03 10:50:23 +00:00
add version to extensions table
This commit is contained in:
@@ -2,6 +2,7 @@ import os
|
||||
import sys
|
||||
import traceback
|
||||
|
||||
import time
|
||||
import git
|
||||
|
||||
from modules import paths, shared
|
||||
@@ -25,6 +26,7 @@ class Extension:
|
||||
self.status = ''
|
||||
self.can_update = False
|
||||
self.is_builtin = is_builtin
|
||||
self.version = ''
|
||||
|
||||
repo = None
|
||||
try:
|
||||
@@ -40,6 +42,10 @@ class Extension:
|
||||
try:
|
||||
self.remote = next(repo.remote().urls, None)
|
||||
self.status = 'unknown'
|
||||
head = repo.head.commit
|
||||
ts = time.asctime(time.gmtime(repo.head.commit.committed_date))
|
||||
self.version = f'{head.hexsha[:7]} ({ts})'
|
||||
|
||||
except Exception:
|
||||
self.remote = None
|
||||
|
||||
|
Reference in New Issue
Block a user