Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
55d222a9
Commit
55d222a9
authored
May 11, 2023
by
Aarni Koskela
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
launch.py: make git_tag() and commit_hash() work even when WEBUI_LAUNCH_LIVE_OUTPUT
parent
54c84e63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
20 deletions
+7
-20
launch.py
launch.py
+7
-20
No files found.
launch.py
View file @
55d222a9
...
@@ -5,6 +5,7 @@ import sys
...
@@ -5,6 +5,7 @@ import sys
import
importlib.util
import
importlib.util
import
platform
import
platform
import
json
import
json
from
functools
import
lru_cache
from
modules
import
cmd_args
from
modules
import
cmd_args
from
modules.paths_internal
import
script_path
,
extensions_dir
from
modules.paths_internal
import
script_path
,
extensions_dir
...
@@ -14,8 +15,6 @@ args, _ = cmd_args.parser.parse_known_args()
...
@@ -14,8 +15,6 @@ args, _ = cmd_args.parser.parse_known_args()
python
=
sys
.
executable
python
=
sys
.
executable
git
=
os
.
environ
.
get
(
'GIT'
,
"git"
)
git
=
os
.
environ
.
get
(
'GIT'
,
"git"
)
index_url
=
os
.
environ
.
get
(
'INDEX_URL'
,
""
)
index_url
=
os
.
environ
.
get
(
'INDEX_URL'
,
""
)
stored_commit_hash
=
None
stored_git_tag
=
None
dir_repos
=
"repositories"
dir_repos
=
"repositories"
# Whether to default to printing command output
# Whether to default to printing command output
...
@@ -56,32 +55,20 @@ Use --skip-python-version-check to suppress this warning.
...
@@ -56,32 +55,20 @@ Use --skip-python-version-check to suppress this warning.
"""
)
"""
)
@
lru_cache
()
def
commit_hash
():
def
commit_hash
():
global
stored_commit_hash
if
stored_commit_hash
is
not
None
:
return
stored_commit_hash
try
:
try
:
stored_commit_hash
=
run
(
f
"{git} rev-parse HEAD"
)
.
strip
()
return
subprocess
.
check_output
(
f
"{git} rev-parse HEAD"
,
encoding
=
'utf8'
)
.
strip
()
except
Exception
:
except
Exception
:
stored_commit_hash
=
"<none>"
return
"<none>"
return
stored_commit_hash
@
lru_cache
()
def
git_tag
():
def
git_tag
():
global
stored_git_tag
if
stored_git_tag
is
not
None
:
return
stored_git_tag
try
:
try
:
stored_git_tag
=
run
(
f
"{git} describe --tags"
)
.
strip
()
return
subprocess
.
check_output
(
f
"{git} describe --tags"
,
encoding
=
'utf8'
)
.
strip
()
except
Exception
:
except
Exception
:
stored_git_tag
=
"<none>"
return
"<none>"
return
stored_git_tag
def
run
(
command
,
desc
=
None
,
errdesc
=
None
,
custom_env
=
None
,
live
:
bool
=
default_command_live
)
->
str
:
def
run
(
command
,
desc
=
None
,
errdesc
=
None
,
custom_env
=
None
,
live
:
bool
=
default_command_live
)
->
str
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment