Skip to content

Commit

Permalink
added code version
Browse files Browse the repository at this point in the history
  • Loading branch information
cole-wilson committed Feb 1, 2021
1 parent 7d6418d commit 940bdfc
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 19 deletions.
2 changes: 1 addition & 1 deletion dist/homebrew/Sailboat.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Binary file removed dist/pypi/sailboat-0.24.6.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/pypi/sailboat-0.24.7.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions docs/available.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Install plugins with `sail add <plugin_name_1> <plugin_name_2> ...`
|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:

Expand Down
2 changes: 1 addition & 1 deletion sailboat.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion sailboat.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions sailboat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# Added by Sailboat:
__version__ = "0.24.5-rc.5"
__version__ = "0.24.7+7d6418d.10" # Added by Sailboat


Binary file modified sailboat/__pycache__/__init__.cpython-38.pyc
Binary file not shown.
Binary file modified sailboat/__pycache__/other.cpython-38.pyc
Binary file not shown.
27 changes: 14 additions & 13 deletions sailboat/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 940bdfc

Please sign in to comment.