mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
add non-git mode
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
## Update for 2023-12-30
|
||||
|
||||
- **Improvements**:
|
||||
- allow deployment without git clone
|
||||
for example, zip of the sdnext folder can be used
|
||||
- control: configurable output folder in settings
|
||||
- cli: sdapi.py allow manual api invoke
|
||||
example: `python cli/sdapi.py /sdapi/v1/sd-models`
|
||||
|
||||
+2
-3
@@ -815,9 +815,8 @@ def check_version(offline=False, reset=True): # pylint: disable=unused-argument
|
||||
if args.skip_all:
|
||||
return
|
||||
if not os.path.exists('.git'):
|
||||
log.error('Not a git repository')
|
||||
if not args.ignore:
|
||||
sys.exit(1)
|
||||
log.warning('Not a git repository, all git operations are disabled')
|
||||
args.skip_git = True # pylint: disable=attribute-defined-outside-init
|
||||
log.info(f'Version: {print_dict(get_version())}')
|
||||
if args.version or args.skip_git:
|
||||
return
|
||||
|
||||
@@ -57,6 +57,9 @@ class Extension:
|
||||
else:
|
||||
try:
|
||||
self.status = 'unknown'
|
||||
if len(repo.remotes) == 0:
|
||||
shared.log.debug(f"Extension: no remotes info repo={self.name}")
|
||||
return
|
||||
self.git_name = repo.remotes.origin.url.split('.git')[0].split('/')[-1]
|
||||
self.description = repo.description
|
||||
if self.description is None or self.description.startswith("Unnamed repository"):
|
||||
@@ -72,7 +75,7 @@ class Extension:
|
||||
self.commit_hash = head.hexsha
|
||||
self.version = f"<p>{self.commit_hash[:8]}</p><p>{datetime.fromtimestamp(self.commit_date).strftime('%a %b%d %Y %H:%M')}</p>"
|
||||
except Exception as ex:
|
||||
shared.log.error(f"Failed reading extension data from Git repository: {self.name}: {ex}")
|
||||
shared.log.error(f"Extension: failed reading data from git repo={self.name}: {ex}")
|
||||
self.remote = None
|
||||
|
||||
def list_files(self, subdir, extension):
|
||||
|
||||
+1
-1
Submodule wiki updated: 6ba5536099...2ad85c5852
Reference in New Issue
Block a user