Skip to content

Commit

Permalink
🥚 🎡 release 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Nov 25, 2017
1 parent 838e7c9 commit 43cd751
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 21 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Change log
===========

v0.0.2 - 25.11.2017
v0.0.3 - 25.11.2017
--------------------------------------------------------------------------------

added
Expand All @@ -10,6 +10,9 @@ added
#. `issue 1<https://github.com/moremoban/gease/issues/1>`_, release repos of the
organisation that you belong to.

v0.0.2 - 15.10.2017
--------------------------------------------------------------------------------

updated
********************************************************************************

Expand Down
8 changes: 1 addition & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,12 @@ First, please create `personal access token` for yourself
`on github <https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/>`_.

.. image:: https://github.com/moremoban/gease/raw/master/images/generate_token.png

Next, please create a gease file(`.gease`) in your home directory and place the
token inside it. Gease file is a simple json file. Here is an example::

{"user":"chfw","personal_access_token":"AAFDAFASDFADFADFADFADFADF"}

Organisation
----------------

In order to make a release for your organisation, "read:org" right is required:

.. image:: https://user-images.githubusercontent.com/4280312/33229231-0220f60e-d1c3-11e7-8c95-3e1207415929.png

Command Line
================================================================================

Expand Down
6 changes: 3 additions & 3 deletions gease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ organisation: "moremoban"
author: "C. W."
contact: "[email protected]"
company: "Onni Software Ltd."
version: "0.0.2"
current_version: 0.0.2
release: "0.0.2"
version: "0.0.3"
current_version: 0.0.3
release: "0.0.3"
copyright_year: 2017
command_line_interface: "gs"
entry_point: "gease.main:main"
Expand Down
2 changes: 1 addition & 1 deletion gease/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__version__ = '0.0.2'
__version__ = '0.0.3'
__author__ = 'C. W.'
__description__ = 'simply makes a git release using github api v3'
41 changes: 32 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

NAME = 'gease'
AUTHOR = 'C. W.'
VERSION = '0.0.2'
VERSION = '0.0.3'
EMAIL = '[email protected]'
LICENSE = 'MIT'
ENTRY_POINTS = {
Expand All @@ -22,7 +22,7 @@
''
)
URL = 'https://github.com/moremoban/gease'
DOWNLOAD_URL = '%s/archive/0.0.2.tar.gz' % URL
DOWNLOAD_URL = '%s/archive/0.0.3.tar.gz' % URL
FILES = ['README.rst', 'CHANGELOG.rst']
KEYWORDS = [
'python'
Expand Down Expand Up @@ -51,11 +51,16 @@
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
EXTRAS_REQUIRE = {
}
# You do not need to read beyond this line
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
sys.executable)
GS_COMMAND = ('gs gease v0.0.2 ' +
"Find 0.0.2 in changelog for more details")
here = os.path.abspath(os.path.dirname(__file__))
GS_COMMAND = ('gs gease v0.0.3 ' +
"Find 0.0.3 in changelog for more details")
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
'Please install gease to enable it.')
UPLOAD_FAILED_MSG = (
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
HERE = os.path.abspath(os.path.dirname(__file__))


class PublishCommand(Command):
Expand All @@ -78,17 +83,36 @@ def finalize_options(self):
def run(self):
try:
self.status('Removing previous builds...')
rmtree(os.path.join(here, 'dist'))
rmtree(os.path.join(HERE, 'dist'))
except OSError:
pass

self.status('Building Source and Wheel (universal) distribution...')
if os.system(GS_COMMAND) == 0:
os.system(PUBLISH_COMMAND)
run_status = True
if has_gease():
run_status = os.system(GS_COMMAND) == 0
else:
self.status(NO_GS_MESSAGE)
if run_status:
if os.system(PUBLISH_COMMAND) != 0:
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)

sys.exit()


def has_gease():
"""
test if github release command is installed
visit http://github.com/moremoban/gease for more info
"""
try:
import gease # noqa
return True
except ImportError:
return False


def read_files(*files):
"""Read files into setup"""
text = ""
Expand Down Expand Up @@ -150,7 +174,6 @@ def filter_out_test_code(file_handle):
zip_safe=False,
entry_points=ENTRY_POINTS,
classifiers=CLASSIFIERS,
setup_requires=['gease'],
cmdclass={
'publish': PublishCommand,
}
Expand Down

0 comments on commit 43cd751

Please sign in to comment.