diff --git a/dist/homebrew/Sailboat.rb b/dist/homebrew/Sailboat.rb index 63f9b68..5805b9f 100644 --- a/dist/homebrew/Sailboat.rb +++ b/dist/homebrew/Sailboat.rb @@ -1,6 +1,6 @@ # Created with sailboat, the Python releaser -# v0.24.6 +# v0.24.7+7d6418d.10 class Sailboat < Formula include Language::Python::Virtualenv diff --git a/dist/pypi/sailboat-0.24.6.tar.gz b/dist/pypi/sailboat-0.24.6.tar.gz deleted file mode 100644 index ecdfcf4..0000000 Binary files a/dist/pypi/sailboat-0.24.6.tar.gz and /dev/null differ diff --git a/dist/pypi/sailboat-0.24.6-py3-none-any.whl b/dist/pypi/sailboat-0.24.7-py3-none-any.whl similarity index 77% rename from dist/pypi/sailboat-0.24.6-py3-none-any.whl rename to dist/pypi/sailboat-0.24.7-py3-none-any.whl index 916b2be..5f6e963 100644 Binary files a/dist/pypi/sailboat-0.24.6-py3-none-any.whl and b/dist/pypi/sailboat-0.24.7-py3-none-any.whl differ diff --git a/dist/pypi/sailboat-0.24.7.tar.gz b/dist/pypi/sailboat-0.24.7.tar.gz new file mode 100644 index 0000000..8e82ff2 Binary files /dev/null and b/dist/pypi/sailboat-0.24.7.tar.gz differ diff --git a/docs/available.md b/docs/available.md index 0acf88c..fc245f9 100644 --- a/docs/available.md +++ b/docs/available.md @@ -15,6 +15,7 @@ Install plugins with `sail add ...` |homebrew|Make homebrew formulae for your projects|yep| |pypi|Make PyPi files and setup.py|yep| |pyinstaller|Make your projects into apps|yep| +|setcodeversion|Add a `__version__` attribute to your project|yep| ## Release Plugins: diff --git a/sailboat.egg-info/PKG-INFO b/sailboat.egg-info/PKG-INFO index 394c61f..86e5491 100644 --- a/sailboat.egg-info/PKG-INFO +++ b/sailboat.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: sailboat -Version: 0.24.6 +Version: 0.24.7 Summary: A quick and easy way to distribute your Python projects! Home-page: https://github.com/cole-wilson/sailboat Author: Cole Wilson diff --git a/sailboat.toml b/sailboat.toml index 4ea4ca7..d7b8e08 100644 --- a/sailboat.toml +++ b/sailboat.toml @@ -13,7 +13,7 @@ description = "" url = "https://github.com/cole-wilson/sailboat" keywords = "" license = "MIT" -latest_build = "0.24.6" +latest_build = "0.24.7+7d6418d.10" author = "Cole Wilson" latest_release = "0.24.5-rc.2" release-notes = "a" diff --git a/sailboat/__init__.py b/sailboat/__init__.py index 53a282e..efedaaa 100644 --- a/sailboat/__init__.py +++ b/sailboat/__init__.py @@ -1,2 +1,3 @@ -# Added by Sailboat: -__version__ = "0.24.5-rc.5" +__version__ = "0.24.7+7d6418d.10" # Added by Sailboat + + diff --git a/sailboat/__pycache__/__init__.cpython-38.pyc b/sailboat/__pycache__/__init__.cpython-38.pyc index 8b0501f..8982afe 100644 Binary files a/sailboat/__pycache__/__init__.cpython-38.pyc and b/sailboat/__pycache__/__init__.cpython-38.pyc differ diff --git a/sailboat/__pycache__/other.cpython-38.pyc b/sailboat/__pycache__/other.cpython-38.pyc index bfde4c4..7c32fdc 100644 Binary files a/sailboat/__pycache__/other.cpython-38.pyc and b/sailboat/__pycache__/other.cpython-38.pyc differ diff --git a/sailboat/other.py b/sailboat/other.py index ab2f4d5..6085636 100644 --- a/sailboat/other.py +++ b/sailboat/other.py @@ -24,19 +24,20 @@ class SetVersion(Plugin): _type = "build" _show = False def run(self): - try: - file = open(self.data['short_name'] + os.sep + '__init__.py') - data = file.read() - file.close() - if "__version__" in data: - data = re.sub("^__version__.*",'# Added by Sailboat:\n__version__ = "{}"\n'.format(self.version),data) - else: - data = "# Added by Sailboat:\n__version__ = \"{}\"\n".format(self.version) + data - file = open(self.data['short_name'] + os.sep + '__init__.py','w+') - file.write(data) - file.close() - except: - pass + # try: + file = open(self.data['short_name'] + os.sep + '__init__.py') + data = file.read() + file.close() + if "__version__" in data: + data = re.sub("^__version__.*",'__version__ = "{}" # Added by Sailboat\n'.format(self.version),data,re.MULTILINE) + data = re.sub("\n__version__.*",'__version__ = "{}" # Added by Sailboat\n'.format(self.version),data,re.MULTILINE) + else: + data = "__version__ = \"{}\" # Added by Sailboat\n".format(self.version) + data + file = open(self.data['short_name'] + os.sep + '__init__.py','w+') + file.write(data) + file.close() + # except: + # pass class BuildDocs(Plugin): _type = "build" _show = False diff --git a/setup.py b/setup.py index 86754ed..6077cd9 100755 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ options = { "name":"sailboat", - "version":"0.24.6", + "version":"0.24.7", "scripts":[], "entry_points":{'console_scripts': ['sail=sailboat.__main__:main', 'sailboat=sailboat.__main__:main'], 'sailboat_plugins': ['quickstart=sailboat.core:QuickStart', 'pypi=sailboat.builders:PyPi', 'homebrew=sailboat.builders:Homebrew', 'pyinstaller=sailboat.builders:PyInstaller', 'dev=sailboat.core:Develop', 'release=sailboat.core:Release', 'build=sailboat.build:Build', 'wizard=sailboat.core:Wizard', 'remove=sailboat.core:Remove', 'add=sailboat.core:Add', 'plugins=sailboat.core:ManagePlugins', 'git=sailboat.core:Git', 'tasks=sailboat.other:Tasks', 'workflow=sailboat.core:Actions', 'github=sailboat.core:Git', 'github_release=sailboat.core:GithubRelease', 'build_docs_readme=sailboat.other:BuildDocs', 'setcodeversion=sailboat.other:SetVersion']}, "author":"Cole Wilson",