Remove GUI versioning (#573)
We can just consider the GUI a variant of command-line mozregression, which simplifies releases a bunch.
This commit is contained in:
Родитель
7ff69a3f6d
Коммит
3a2d65656a
|
@ -1 +0,0 @@
|
||||||
__version__ = '0.9.46'
|
|
|
@ -3,7 +3,7 @@ from PySide2.QtGui import QDesktopServices
|
||||||
from PySide2.QtWidgets import QLabel
|
from PySide2.QtWidgets import QLabel
|
||||||
from mozregression.network import retry_get
|
from mozregression.network import retry_get
|
||||||
|
|
||||||
from . import __version__
|
from mozregression import __version__ as mozregression_version
|
||||||
|
|
||||||
|
|
||||||
class CheckReleaseThread(QThread):
|
class CheckReleaseThread(QThread):
|
||||||
|
@ -39,8 +39,8 @@ class CheckRelease(QObject):
|
||||||
|
|
||||||
@Slot()
|
@Slot()
|
||||||
def on_release_found(self):
|
def on_release_found(self):
|
||||||
release_name = self.thread.tag_name.replace('gui-', '')
|
release_name = self.thread.tag_name
|
||||||
if release_name == __version__:
|
if release_name == mozregression_version:
|
||||||
return
|
return
|
||||||
|
|
||||||
self.label.setText(
|
self.label.setText(
|
||||||
|
|
|
@ -2,7 +2,6 @@ import sys
|
||||||
import traceback
|
import traceback
|
||||||
import platform
|
import platform
|
||||||
import mozregression
|
import mozregression
|
||||||
from . import __version__
|
|
||||||
|
|
||||||
from PySide2.QtCore import QObject, Slot, Signal, Qt
|
from PySide2.QtCore import QObject, Slot, Signal, Qt
|
||||||
from PySide2.QtWidgets import QDialog
|
from PySide2.QtWidgets import QDialog
|
||||||
|
@ -13,7 +12,6 @@ class CrashDialog(QDialog):
|
||||||
ERR_TEMPLATE = """\
|
ERR_TEMPLATE = """\
|
||||||
platform: %(platform)s
|
platform: %(platform)s
|
||||||
python: %(python)s (%(arch)s)
|
python: %(python)s (%(arch)s)
|
||||||
mozregui: %(mozregui)s
|
|
||||||
mozregression: %(mozregression)s
|
mozregression: %(mozregression)s
|
||||||
message: %(message)s
|
message: %(message)s
|
||||||
traceback: %(traceback)s
|
traceback: %(traceback)s
|
||||||
|
@ -27,7 +25,6 @@ traceback: %(traceback)s
|
||||||
def set_exception(self, type, value, tb):
|
def set_exception(self, type, value, tb):
|
||||||
frozen = ' FROZEN' if getattr(sys, 'frozen', False) else ''
|
frozen = ' FROZEN' if getattr(sys, 'frozen', False) else ''
|
||||||
self.ui.information.setPlainText(self.ERR_TEMPLATE % dict(
|
self.ui.information.setPlainText(self.ERR_TEMPLATE % dict(
|
||||||
mozregui=__version__,
|
|
||||||
mozregression=mozregression.__version__,
|
mozregression=mozregression.__version__,
|
||||||
message="%s: %s" % (type.__name__, value),
|
message="%s: %s" % (type.__name__, value),
|
||||||
traceback=''.join(traceback.format_tb(tb)) if tb else 'NONE',
|
traceback=''.join(traceback.format_tb(tb)) if tb else 'NONE',
|
||||||
|
|
|
@ -19,20 +19,15 @@ ABOUT_TEXT = """\
|
||||||
<p><strong>mozregression-gui</strong> is a desktop interface for
|
<p><strong>mozregression-gui</strong> is a desktop interface for
|
||||||
<strong>mozregression</strong>, a regression range finder for Mozilla
|
<strong>mozregression</strong>, a regression range finder for Mozilla
|
||||||
nightly and inbound builds.</p>
|
nightly and inbound builds.</p>
|
||||||
<br>
|
<p><a href="http://mozilla.github.io/mozregression/">\
|
||||||
<a href="http://mozilla.github.io/mozregression/">\
|
http://mozilla.github.io/mozregression/</a></p>
|
||||||
http://mozilla.github.io/mozregression/</a>
|
<p><b>Using mozregression version: %s</b></p>
|
||||||
<br>
|
<p>All application icons are made by <a href="http://www.freepik.com"
|
||||||
<ul>
|
|
||||||
<li>Version: %s</li>
|
|
||||||
<li>Using mozregression version: %s</li>
|
|
||||||
</ul>
|
|
||||||
<div>All icons are made by <a href="http://www.freepik.com"
|
|
||||||
title="Freepik">Freepik</a>
|
title="Freepik">Freepik</a>
|
||||||
from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a>
|
from <a href="http://www.flaticon.com" title="Flaticon">www.flaticon.com</a>
|
||||||
and licensed under <a href="http://creativecommons.org/licenses/by/3.0/"
|
and licensed under <a href="http://creativecommons.org/licenses/by/3.0/"
|
||||||
title="Creative Commons BY 3.0">CC BY 3.0</a></div>
|
title="Creative Commons BY 3.0">CC BY 3.0</a></p>
|
||||||
""" % (mozregui.__version__, mozregression.__version__)
|
""" % (mozregression.__version__)
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QMainWindow):
|
class MainWindow(QMainWindow):
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from mozregui import __version__
|
from mozregression import __version__
|
||||||
from mozregui.main import MainWindow
|
from mozregui.main import MainWindow
|
||||||
from mozregui.check_release import CheckRelease, QLabel, QUrl
|
from mozregui.check_release import CheckRelease, QLabel, QUrl
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ def test_check_release_no_update(qtbot, mocker, mainwindow):
|
||||||
retry_get = mocker.patch("mozregui.check_release.retry_get")
|
retry_get = mocker.patch("mozregui.check_release.retry_get")
|
||||||
retry_get.return_value = mocker.Mock(
|
retry_get.return_value = mocker.Mock(
|
||||||
json=lambda *a: {
|
json=lambda *a: {
|
||||||
'tag_name': 'gui-' + __version__,
|
'tag_name': __version__,
|
||||||
'html_url': 'url'
|
'html_url': 'url'
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче