Fix version URL when repo is cloned from a ".git" URL

This commit is contained in:
awsr
2025-10-31 16:03:07 -07:00
committed by GitHub
parent 7fc8547729
commit 547420f985
+1 -1
View File
@@ -1442,7 +1442,7 @@ def get_version(force=False):
'updated': updated,
'hash': githash,
'branch': branch_name.replace('\n', ''),
'url': origin.replace('\n', '') + '/tree/' + branch_name.replace('\n', '')
'url': origin.replace('\n', '').removesuffix('.git', '') + '/tree/' + branch_name.replace('\n', '')
}
except Exception:
version = { 'app': 'sd.next', 'version': 'unknown', 'branch': 'unknown' }