Skip to content

Commit

Permalink
(feat) add versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
azai91 committed Nov 1, 2015
1 parent 9870956 commit dc4b3ef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 1 addition & 5 deletions src/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ def main(_):
options = True if wf.args[0][0] == '>' else False

if wf.update_available:
# wf.start_update()
wf.add_item(
'An update is available!',
autocomplete='workflow:update')
return wf.send_feedback()
Drive.add_update()

try:
user_input = wf.args[0][1::].strip() if options else wf.args[0]
Expand Down
11 changes: 10 additions & 1 deletion src/drive_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
from config import CLIENT_ID, CLIENT_SECRET, SCOPE, REDIRECT_URI, FILES_URL, AUTH_URL, TOKEN_URL, TOKEN_URL, CACHE_MAX_AGE
import requests
from workflow import Workflow, ICON_USER
UPDATE_SETTINGS = {'github_slug' : 'azai91/alfred-drive-workflow'}
HELP_URL = 'https://github.com/azai91/alfred-drive-workflow/issues'

wf = Workflow()
wf = Workflow(update_settings=UPDATE_SETTINGS, help_url=HELP_URL)

class Drive:

Expand Down Expand Up @@ -119,6 +121,13 @@ def show_logout(cls):
icon=ICON_USER,
valid=True)

@classmethod
def add_update(cls):
wf.add_item(
'New version available!',
'Action this item to install the update',
autocomplete='workflow:update')

def add_items(links):
# sorted(links, key=lambda link : link['lastViewedByMeDate'])
for index, link in enumerate(links):
Expand Down
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.3
0.1

0 comments on commit dc4b3ef

Please sign in to comment.