Guide: Auto-update extensions #3600
Replies: 6 comments 4 replies
-
Because I have been disabling and enabling my extensions (Moving the folder in and out of extensions) I updated my script to check if the folder exists and skip if it's missing. It's overkill, but I thought I would share anyway. Start.bat
The output in the console looks like this...
|
Beta Was this translation helpful? Give feedback.
-
Great work. I just had updated it to be more automatic. I created a loop in extensions directory, and it will automatically detect the extensions list, loop through them and update them. I have separated the update bat file in an external file that can be called from the "webui-user.bat" directly right before start. Here is the update bat file "update_sd_and_extensions.bat". You can place it in the same folder of "webui-user.bat". Update the directory of the extensions to yours, then call it in the "webui-user.bat" file. The webui and extensions update file, and this is how you call it in the "webui-user.bat": "call update_sd_and_extensions.bat"
|
Beta Was this translation helpful? Give feedback.
-
for unix users: ls extensions/ | while read LINE; do
pushd extensions/$LINE >/dev/null
git pull --quiet
VER=$(git log -1 --pretty=format:"%h %ad")
URL=$(git remote get-url origin)
popd >/dev/null
echo "- $VER $URL"
done |
Beta Was this translation helpful? Give feedback.
-
@AhmedGit Thanks for the script to parse all of the extensions. Here is what I am currently using for startup scripts. I have a start script that sets my environment variables and then calls two other scripts, one to update extensions, and one to update the webUI The benefit of this is I have multiple start scripts with different variables, some have auth enabled or dissabled. Some use different styles.csv. So depending on who is going to use the WebUI I can change what shows up. Start-Full.bat
Update-e.bat
Update-SD.bat
|
Beta Was this translation helpful? Give feedback.
-
I didn't read it all, but this seems pretty complex to me, just today I asked chatGPT about this and it came out with a solution extremely quick both to deploy and use, it is based on subprocess that takes advantager of multi cores and multi threads to check everything intantly, and saves you from unwanted infos at every launch by printing only the info of the etensions that it has just updated, It only takes 2 seconds to check my 50 extensions installed, here is the discussion about it with the complete script: #8025 |
Beta Was this translation helpful? Give feedback.
-
For those curious here is what the console output looks like:
|
Beta Was this translation helpful? Give feedback.
-
UPDATE: Better versions in the comments.
I am no expert, but for anyone like me that was doing a git pull as part of their starting script and now want to ensure their extensions also get updated here is what I found works for me.
instead of just
git pull
you can use:git -C "Filepath to one of the extension repo folders" pull
in your startup bat file, with one per extension.
Here are my files for example:
I have a bat file in the A1111 folder called Start.bat
START.BAT
Obviously set your own port and authentication, or just remove those arguments.
I also have a bat file in the A1111 folder called Stop.bat
STOP.BAT
I am sure there is probably a better way, and maybe a built-in way coming some day, but I thought I would share for people trying to find a working solution.
Beta Was this translation helpful? Give feedback.
All reactions