Consolidate version numbers (#2201)

* update version number

* print version number at startup

* move version number into ldm/invoke/_version.py

* bump version to 2.2.6+a0

* handle whitespace better

* resolve issues raised by mauwii during PR review
This commit is contained in:
Lincoln Stein 2023-01-14 22:07:21 -05:00 committed by GitHub
parent 4dd74cdc68
commit c855d2a350
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 8 deletions

9
installer/create_installer.sh Executable file → Normal file
View File

@ -2,24 +2,23 @@
cd "$(dirname "$0")"
VERSION=$(grep ^VERSION ../setup.py | awk '{ print $3 }' | sed "s/'//g" )
VERSION=$(cd ..; python -c "from ldm.invoke import __version__ as version; print(version)")
PATCH=""
VERSION="v${VERSION}${PATCH}"
echo Building installer for version $VERSION
echo "Be certain that you're in the 'installer' directory before continuing."
read -p "Press any key to continue, or CTRL-C to exit..."
read -e -p "Commit and tag this repo with ${VERSION} and 'latest'? [n]: " input
RESPONSE=${input:='n'}
if [ "$RESPONSE" == 'y' ]; then
git commit -a
if ! git tag $VERSION ; then
echo "Existing/invalid tag"
exit -1
echo "Existing/invalid tag"
exit -1
fi
git push origin :refs/tags/latest
git tag -fa latest
fi

View File

@ -1,3 +1,4 @@
from ._version import __version__
__app_id__= 'invoke-ai/InvokeAI'
__app_name__= 'InvokeAI'
__version__='2.2.5'
__app_name__= 'InvokeAI'

1
ldm/invoke/_version.py Normal file
View File

@ -0,0 +1 @@
__version__='2.2.6+a0'

View File

@ -1,3 +1,4 @@
import sys
import os
import re
from setuptools import setup, find_packages
@ -9,7 +10,12 @@ def list_files(directory):
listing.append(pair)
return listing
VERSION = '2.2.5'
def get_version()->str:
from ldm.invoke import __version__ as version
return version
# The canonical version number is stored in the file ldm/invoke/_version.py
VERSION = get_version()
DESCRIPTION = ('An implementation of Stable Diffusion which provides various new features'
' and options to aid the image generation process')
LONG_DESCRIPTION = ('This version of Stable Diffusion features a slick WebGUI, an'