Skip to content

Commit 43cd751

Browse files
committed
🥚 🎡 release 0.0.3
1 parent 838e7c9 commit 43cd751

File tree

5 files changed

+41
-21
lines changed

5 files changed

+41
-21
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Change log
22
===========
33

4-
v0.0.2 - 25.11.2017
4+
v0.0.3 - 25.11.2017
55
--------------------------------------------------------------------------------
66

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

13+
v0.0.2 - 15.10.2017
14+
--------------------------------------------------------------------------------
15+
1316
updated
1417
********************************************************************************
1518

README.rst

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,12 @@ First, please create `personal access token` for yourself
4848
`on github <https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/>`_.
4949

5050
.. image:: https://github.com/moremoban/gease/raw/master/images/generate_token.png
51+
5152
Next, please create a gease file(`.gease`) in your home directory and place the
5253
token inside it. Gease file is a simple json file. Here is an example::
5354

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

56-
Organisation
57-
----------------
58-
59-
In order to make a release for your organisation, "read:org" right is required:
60-
61-
.. image:: https://user-images.githubusercontent.com/4280312/33229231-0220f60e-d1c3-11e7-8c95-3e1207415929.png
62-
6357
Command Line
6458
================================================================================
6559

gease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ organisation: "moremoban"
44
author: "C. W."
55
contact: "wangc_2011@hotmail.com"
66
company: "Onni Software Ltd."
7-
version: "0.0.2"
8-
current_version: 0.0.2
9-
release: "0.0.2"
7+
version: "0.0.3"
8+
current_version: 0.0.3
9+
release: "0.0.3"
1010
copyright_year: 2017
1111
command_line_interface: "gs"
1212
entry_point: "gease.main:main"

gease/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
__version__ = '0.0.2'
1+
__version__ = '0.0.3'
22
__author__ = 'C. W.'
33
__description__ = 'simply makes a git release using github api v3'

setup.py

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
NAME = 'gease'
1111
AUTHOR = 'C. W.'
12-
VERSION = '0.0.2'
12+
VERSION = '0.0.3'
1313
EMAIL = 'wangc_2011@hotmail.com'
1414
LICENSE = 'MIT'
1515
ENTRY_POINTS = {
@@ -22,7 +22,7 @@
2222
''
2323
)
2424
URL = 'https://github.com/moremoban/gease'
25-
DOWNLOAD_URL = '%s/archive/0.0.2.tar.gz' % URL
25+
DOWNLOAD_URL = '%s/archive/0.0.3.tar.gz' % URL
2626
FILES = ['README.rst', 'CHANGELOG.rst']
2727
KEYWORDS = [
2828
'python'
@@ -51,11 +51,16 @@
5151
PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests'])
5252
EXTRAS_REQUIRE = {
5353
}
54+
# You do not need to read beyond this line
5455
PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format(
5556
sys.executable)
56-
GS_COMMAND = ('gs gease v0.0.2 ' +
57-
"Find 0.0.2 in changelog for more details")
58-
here = os.path.abspath(os.path.dirname(__file__))
57+
GS_COMMAND = ('gs gease v0.0.3 ' +
58+
"Find 0.0.3 in changelog for more details")
59+
NO_GS_MESSAGE = ('Automatic github release is disabled. ' +
60+
'Please install gease to enable it.')
61+
UPLOAD_FAILED_MSG = (
62+
'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND)
63+
HERE = os.path.abspath(os.path.dirname(__file__))
5964

6065

6166
class PublishCommand(Command):
@@ -78,17 +83,36 @@ def finalize_options(self):
7883
def run(self):
7984
try:
8085
self.status('Removing previous builds...')
81-
rmtree(os.path.join(here, 'dist'))
86+
rmtree(os.path.join(HERE, 'dist'))
8287
except OSError:
8388
pass
8489

8590
self.status('Building Source and Wheel (universal) distribution...')
86-
if os.system(GS_COMMAND) == 0:
87-
os.system(PUBLISH_COMMAND)
91+
run_status = True
92+
if has_gease():
93+
run_status = os.system(GS_COMMAND) == 0
94+
else:
95+
self.status(NO_GS_MESSAGE)
96+
if run_status:
97+
if os.system(PUBLISH_COMMAND) != 0:
98+
self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND)
8899

89100
sys.exit()
90101

91102

103+
def has_gease():
104+
"""
105+
test if github release command is installed
106+
107+
visit http://github.com/moremoban/gease for more info
108+
"""
109+
try:
110+
import gease # noqa
111+
return True
112+
except ImportError:
113+
return False
114+
115+
92116
def read_files(*files):
93117
"""Read files into setup"""
94118
text = ""
@@ -150,7 +174,6 @@ def filter_out_test_code(file_handle):
150174
zip_safe=False,
151175
entry_points=ENTRY_POINTS,
152176
classifiers=CLASSIFIERS,
153-
setup_requires=['gease'],
154177
cmdclass={
155178
'publish': PublishCommand,
156179
}

0 commit comments

Comments
 (0)