Skip to content

Commit

Permalink
NXDRIVE-2748: review auto update install latest update behavior (#3364)
Browse files Browse the repository at this point in the history
* NXDRIVE-2748: Review Auto Update Install latest update behavior

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
mr-shekhar and dependabot[bot] authored Jan 25, 2022
1 parent a4e2c8c commit a3e9b28
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
2 changes: 1 addition & 1 deletion nxdrive/data/i18n/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"FATAL_ERROR_TITLE": "%1 - Fatal error",
"FATAL_ERROR_UPDATE_BTN": "Download latest version",
"FATAL_ERROR_UPDATE_TOOLTIP": "We advise you to update to the latest version of %1",
"FEATURE_AUTO_UPDATE": "Enable or disable the update mechanism of the application.",
"FEATURE_AUTO_UPDATE": "Notify when new update is available.",
"FEATURE_DIRECT_TRANSFER": "One-time transfer of content between the Nuxeo Server and the desktop.",
"FEATURE_DIRECT_EDIT": "Edit any of document’s content from their Summary tab even if they are not synchronized.",
"FEATURE_S3": "Improve the speed of your uploads by leveraging the AWS infrastructure. Even enabled, this feature will be effective only for Nuxeo Cloud customers and for Nuxeo servers with S3 Direct Upload addon installed and up-to-date.",
Expand Down
2 changes: 0 additions & 2 deletions nxdrive/feature.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
s3=False,
)

FeatureList = {"auto_update": "Notify when new update is available"}

Beta: List[str] = ["s3"]

DisabledFeatures: List[str] = []
7 changes: 2 additions & 5 deletions nxdrive/gui/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
RootAlreadyBindWithDifferentAccount,
StartupPageConnectionError,
)
from ..feature import Feature, FeatureList
from ..feature import Feature
from ..notification import Notification
from ..objects import Binder, DocPair
from ..options import Options
Expand Down Expand Up @@ -335,10 +335,7 @@ def get_features_list(self) -> List[List[str]]:
"""Return the list of declared features with their value, title and translation key."""
result = []
for feature in vars(Feature).keys():
if feature in FeatureList.keys():
title = FeatureList[feature]
else:
title = feature.replace("_", " ").title()
title = feature.replace("_", " ").title()
translation_key = f"FEATURE_{feature.upper()}"
result.append([title, feature, translation_key])
return result
Expand Down
6 changes: 0 additions & 6 deletions tools/scripts/check_update_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,14 @@ def get_version():
f"{Path.home()}/Applications/Nuxeo Drive.app/Contents/MacOS/ndrive",
"--version",
]
print("get_version() ", cmd)
print(subprocess.check_output(cmd, text=True))

return subprocess.check_output(cmd, text=True).strip()

file = (
expandvars("C:\\Users\\%username%\\.nuxeo-drive\\VERSION")
if EXT == "exe"
else expanduser("~/.nuxeo-drive/VERSION")
)
print("file: ", file)
with open(file, encoding="utf-8") as f:
print(f.read())
return f.read().strip()


Expand Down Expand Up @@ -357,7 +352,6 @@ def version_find():
with open(path, encoding="utf-8") as handler:
for lineno, line in enumerate(handler.readlines()):
if line.startswith("__version__"):
print(re.findall(r'"(.+)"', line))
version = re.findall(r'"(.+)"', line)[0]
print(">>> Current version is", version, "at line", lineno, flush=True)
return version, lineno
Expand Down

0 comments on commit a3e9b28

Please sign in to comment.