From 85b56247a33a191448bf4dd22c0de287aca46787 Mon Sep 17 00:00:00 2001 From: Jack Date: Sat, 4 Jun 2016 15:11:51 -0400 Subject: [PATCH] merge add-tests-to-travis updates --- .travis.yml | 15 +++++++++++++-- lbrynet/lbrylive/LBRYStdinUploader.py | 5 ++++- lbrynet/lbrylive/LBRYStdoutDownloader.py | 5 ++++- lbrynet/lbrynet_console/ControlHandlers.py | 2 +- lbrynet/lbrynet_gui/GuiApp.py | 10 +++++----- lbrynet/lbrynet_gui/StreamFrame.py | 4 ++-- packaging/ubuntu/ubuntu_package_setup.sh | 4 ++++ 7 files changed, 33 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index c7a722242..865ea7427 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,17 @@ script: - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew upgrade gmp; fi # the default py2app (v0.9) has a bug that is fixed in the head of /metachris/py2app - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install git+https://github.com/metachris/py2app; fi - # py2app fails to find jsonrpc unless json-rpc is installed. why? I don't know. - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip install jsonrpc; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd packaging/osx/lbry-osx-app; ./setup_app.sh; cd $TRAVIS_BUILD_DIR; fi \ No newline at end of file + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cd packaging/osx/lbry-osx-app; ./setup_app.sh; cd $TRAVIS_BUILD_DIR; fi + # fail the build if this is a build for a tag and we don't have the versions matching + - if [[ -n "${TRAVIS_TAG}" ]]; then if [[ "v`python setup.py -V`" = "${TRAVIS_TAG}" ]]; then true; else false; fi; fi + +deploy: + provider: releases + file: "${TRAVIS_BUILD_DIR}/`python setup.py --name`_`python setup.py -V`_amd64.deb" + skip_cleanup: true + on: + tags: true + # this is the oauth token for the lbry-ci user + api_key: + secure: nKdWGROnLNodx9k9nWvq2wezkPvSVL8zF63qjPXjhdOe9kCUbcLp7WnFDYpn9EJj4Pofq/ejeCHwjA+5x7JUP3Szk7SlJV61B4c/5hl64rl7oSKOoKskjdE2jaOG3CJuOUrh0yQ59U3vMMABcsnw/wJaCIuu/erdPIm8g8R+stu1YHOGtl5Y9WiW+zLJn2vc3GooV1TWtki9EnrmFfw0Vrqc4RMVMFB1ojE7ggrK1LIwcmGSbLIYzker1ZRz8SCy+84sGk4//V+2i2NNiz5AkPuG7BBGrU2twE9nD23IlruJAdVdi71P3ytAmi0kKyvxIU4VeNaqyTk9zeL5IB9J5IIgvekHgKcsKhFUZ6QcXT1Xfxl4ELftvWCTHWiewnXFdqLcG9GZiUaE6+7wdalwDAP3tqS2emiibetlBZERHR+RMR00ej+1MBYWGMlTse/0Tglndv0a2qqgAJYLKPRT02hTRYGxZ1MrJe+WGnChRmzwgLVTIgZuiDciFOahN0TYGSORk6OpnZBsxvpzSqDw5UDJx0BmbJ1xMNDFbOs8ubZ9yIpB9yNMGw66FPacOF61XNYnmA68ILC28UtOFKuuHLrUPbM5JmQkDVhtTfFbBnyHefyCLAL4MHvJJKGi1oaOXjYaJ/J095h636/kQ0cHHuVMgoWUQZOQ44xRAz7tMuc= diff --git a/lbrynet/lbrylive/LBRYStdinUploader.py b/lbrynet/lbrylive/LBRYStdinUploader.py index d9873b362..086cb52a0 100644 --- a/lbrynet/lbrylive/LBRYStdinUploader.py +++ b/lbrynet/lbrylive/LBRYStdinUploader.py @@ -1,3 +1,6 @@ +# pylint: skip-file +# This file is not maintained, but might be used in the future +# import logging import sys from lbrynet.lbrylive.LiveStreamCreator import StdOutLiveStreamCreator @@ -115,4 +118,4 @@ def launch_stdin_uploader(): d.addCallback(lambda _: start_stdin_uploader()) d.addCallback(lambda _: shut_down()) reactor.addSystemEventTrigger('before', 'shutdown', uploader.shut_down) - reactor.run() \ No newline at end of file + reactor.run() diff --git a/lbrynet/lbrylive/LBRYStdoutDownloader.py b/lbrynet/lbrylive/LBRYStdoutDownloader.py index 97a91fbfe..317cfefa2 100644 --- a/lbrynet/lbrylive/LBRYStdoutDownloader.py +++ b/lbrynet/lbrylive/LBRYStdoutDownloader.py @@ -1,3 +1,6 @@ +# pylint: skip-file +# This file is not maintained, but might be used in the future +# import logging import sys @@ -95,4 +98,4 @@ def launch_stdout_downloader(): d.addErrback(print_error) d.addCallback(lambda _: shut_down()) reactor.addSystemEventTrigger('before', 'shutdown', downloader.shut_down) - reactor.run() \ No newline at end of file + reactor.run() diff --git a/lbrynet/lbrynet_console/ControlHandlers.py b/lbrynet/lbrynet_console/ControlHandlers.py index cbe5dd270..d19d55c88 100644 --- a/lbrynet/lbrynet_console/ControlHandlers.py +++ b/lbrynet/lbrynet_console/ControlHandlers.py @@ -120,7 +120,7 @@ class CommandHandlerFactory(object): return self.control_handler_class.prompt_description def get_handler(self, console): - return self.control_handler_class(console, *self.args) + return self.control_handler_class(console, *self.args) # pylint: disable=not-callable class CommandHandler(object): diff --git a/lbrynet/lbrynet_gui/GuiApp.py b/lbrynet/lbrynet_gui/GuiApp.py index 94c977759..176cce9d7 100644 --- a/lbrynet/lbrynet_gui/GuiApp.py +++ b/lbrynet/lbrynet_gui/GuiApp.py @@ -176,10 +176,10 @@ class DownloaderApp(object): style="Stop.TButton", cursor=button_cursor) self.wallet_menu_button.grid(row=0, column=1, padx=(5, 0)) - def popup(event): + def popup_wallet(event): self.wallet_menu.tk_popup(event.x_root, event.y_root) - self.wallet_menu_button.bind("", popup) + self.wallet_menu_button.bind("", popup_wallet) self.uri_frame = ttk.Frame(self.frame, style="B.TFrame") self.uri_frame.grid() @@ -204,7 +204,7 @@ class DownloaderApp(object): def paste_command(): self.uri_entry.event_generate('') - def popup(event): + def popup_uri(event): selection_menu = tk.Menu( self.master, tearoff=0 ) @@ -214,7 +214,7 @@ class DownloaderApp(object): selection_menu.add_command(label=" Paste ", command=paste_command) selection_menu.tk_popup(event.x_root, event.y_root) - self.uri_entry.bind("", popup) + self.uri_entry.bind("", popup_uri) self.uri_button = ttk.Button( self.uri_frame, text="Go", command=self._open_stream, @@ -349,4 +349,4 @@ class AddressWindow(object): window, text="OK", command=window.destroy, style="LBRY.TButton" ) done_button.grid(row=1, column=1, pady=(0, 5), padx=5, sticky=tk.W) - window.focus_set() \ No newline at end of file + window.focus_set() diff --git a/lbrynet/lbrynet_gui/StreamFrame.py b/lbrynet/lbrynet_gui/StreamFrame.py index defcbacc9..de07c4d55 100644 --- a/lbrynet/lbrynet_gui/StreamFrame.py +++ b/lbrynet/lbrynet_gui/StreamFrame.py @@ -118,7 +118,7 @@ class StreamFrame(object): def cancel(self): if self.cancel_func is not None: - self.cancel_func() + self.cancel_func() # pylint: disable=not-callable self.stream_frame.destroy() self.app.stream_removed() @@ -460,4 +460,4 @@ class StreamFrame(object): if self.cost_label is not None and self.cost_label.winfo_exists(): self.cost_label.config(text=locale.format_string("%.2f LBC", (round(total_points_paid, 2),), - grouping=True)) \ No newline at end of file + grouping=True)) diff --git a/packaging/ubuntu/ubuntu_package_setup.sh b/packaging/ubuntu/ubuntu_package_setup.sh index f35a78b72..70cd064e4 100755 --- a/packaging/ubuntu/ubuntu_package_setup.sh +++ b/packaging/ubuntu/ubuntu_package_setup.sh @@ -164,3 +164,7 @@ $SUDO chown root:root debian-binary control.tar.gz data.tar.xz ar r "$PACKAGE" debian-binary control.tar.gz data.tar.xz # TODO: we can append to data.tar instead of extracting it all and recompressing + +if [[ -n "${TRAVIS_BUILD_DIR}" ]]; then + mv "${PACKAGE}" "${TRAVIS_BUILD_DIR}/${PACKAGE}" +fi