Prepare Wormhole 0.1.2 with registered settings and Ctrl shortcut
This commit is contained in:
1 parent
48f7d5262c
commit
9823d77b55
4 files changed
+23
-12
No files matched your search
@@ -10,9 +10,9 @@ Repository material and both Tentacles are licensed under GPL-3.0-or-later; see
|
|||||||
Tentacles, each in a direct top-level folder with its own `tentacle.toml`.
|
Tentacles, each in a direct top-level folder with its own `tentacle.toml`.
|
||||||
The catalog lists native packages for Linux amd64 and arm64. Hello World 0.1.0 is
|
The catalog lists native packages for Linux amd64 and arm64. Hello World 0.1.0 is
|
||||||
available from the [release page](https://git.stormux.org/storm/cthulhu-tentacles/releases/tag/hello-world-v0.1.0).
|
available from the [release page](https://git.stormux.org/storm/cthulhu-tentacles/releases/tag/hello-world-v0.1.0).
|
||||||
Wormhole 0.1.1 requires the matching reader with interactive Tentacle support.
|
Wormhole 0.1.2 requires the matching reader with interactive Tentacle settings support.
|
||||||
Its release archives are prepared for upload to the Wormhole release page;
|
Native packages are available from the
|
||||||
installation becomes available once both archives have been uploaded.
|
[Wormhole release page](https://git.stormux.org/storm/cthulhu-tentacles/releases/tag/wormhole-v0.1.2).
|
||||||
Local build artifacts live in the ignored `dist/` directory.
|
Local build artifacts live in the ignored `dist/` directory.
|
||||||
The discovery source URL is
|
The discovery source URL is
|
||||||
`https://git.stormux.org/storm/cthulhu-tentacles`.
|
`https://git.stormux.org/storm/cthulhu-tentacles`.
|
||||||
|
|||||||
+16
-4
@@ -36,7 +36,7 @@ def check_metadata(repoRoot):
|
|||||||
require(item["manifest"] == f"{name}/tentacle.toml", "Manifest path must match ID")
|
require(item["manifest"] == f"{name}/tentacle.toml", "Manifest path must match ID")
|
||||||
manifest = read_toml(repoRoot / item["manifest"])
|
manifest = read_toml(repoRoot / item["manifest"])
|
||||||
require(manifest["format-version"] == 1 and manifest["id"] == name
|
require(manifest["format-version"] == 1 and manifest["id"] == name
|
||||||
and manifest["name"] and manifest["version"] == ("0.1.1" if name == "wormhole" else "0.1.0"), "Invalid Tentacle metadata")
|
and manifest["name"] and manifest["version"] == ("0.1.2" if name == "wormhole" else "0.1.0"), "Invalid Tentacle metadata")
|
||||||
expectedGrants = ["presentation"] + (["interaction"] if name == "wormhole" else [])
|
expectedGrants = ["presentation"] + (["interaction"] if name == "wormhole" else [])
|
||||||
expectedProgram = "wormhole-tentacle" if name == "wormhole" else name
|
expectedProgram = "wormhole-tentacle" if name == "wormhole" else name
|
||||||
require(manifest["entry-point"] == [f"bin/{expectedProgram}"]
|
require(manifest["entry-point"] == [f"bin/{expectedProgram}"]
|
||||||
@@ -81,11 +81,14 @@ def check_registration(programPath, name):
|
|||||||
require(registration["id"] == "1" and registration["result"]["session"] == "check",
|
require(registration["id"] == "1" and registration["result"]["session"] == "check",
|
||||||
"Invalid registration response")
|
"Invalid registration response")
|
||||||
commands = registration["result"]["commands"]
|
commands = registration["result"]["commands"]
|
||||||
require(len(commands) == (7 if name == "wormhole" else 1) and commands[0]["id"] == name
|
require(len(commands) == (9 if name == "wormhole" else 1) and commands[0]["id"] == name
|
||||||
and commands[0]["presentation"] is True, "Unexpected commands or grant")
|
and commands[0]["presentation"] is True, "Unexpected commands or grant")
|
||||||
require(commands[0]["bindings"] == [
|
require(commands[0]["bindings"] == [
|
||||||
{"layout": layout, "scope": "global", "key": ("Cthulhu+Alt+Shift+W" if name == "wormhole" else "Cthulhu+Alt+Shift+H")}
|
{"layout": layout, "scope": "global", "key": ("Cthulhu+Ctrl+Shift+W" if name == "wormhole" else "Cthulhu+Alt+Shift+H")}
|
||||||
for layout in ("desktop", "laptop")], "Wrong suggested shortcut")
|
for layout in ("desktop", "laptop")], "Wrong suggested shortcut")
|
||||||
|
if name == "wormhole":
|
||||||
|
require([command["id"] for command in commands if command.get("settings")]
|
||||||
|
== ["settings"], "Wrong registered settings entry point")
|
||||||
process.stdin.close()
|
process.stdin.close()
|
||||||
require(process.wait(timeout=5) == 0, "Tentacle did not stop cleanly on EOF")
|
require(process.wait(timeout=5) == 0, "Tentacle did not stop cleanly on EOF")
|
||||||
finally:
|
finally:
|
||||||
@@ -109,6 +112,15 @@ def check_host(repoRoot, programPath, name):
|
|||||||
or value == {"speech": "Magic wormhole is not installed",
|
or value == {"speech": "Magic wormhole is not installed",
|
||||||
"braille": "Magic wormhole is not installed", "uninterruptible": True},
|
"braille": "Magic wormhole is not installed", "uninterruptible": True},
|
||||||
"Host returned an unexpected Wormhole menu")
|
"Host returned an unexpected Wormhole menu")
|
||||||
|
result = subprocess.run([
|
||||||
|
"go", "run", "./cmd/tentacle-host", "-presentation", "-interaction",
|
||||||
|
"-command", "settings", str(programPath),
|
||||||
|
], cwd=readerRoot, env=environment, capture_output=True, text=True,
|
||||||
|
timeout=60, check=True)
|
||||||
|
value = json.loads(result.stdout)
|
||||||
|
require(value.get("form", {}).get("title") == "Wormhole preferences"
|
||||||
|
and value.get("next") == "save-settings",
|
||||||
|
"Host returned an unexpected Wormhole settings form")
|
||||||
return
|
return
|
||||||
require(json.loads(result.stdout) == {
|
require(json.loads(result.stdout) == {
|
||||||
"speech": "Hello world!", "braille": "Hello world!", "uninterruptible": True,
|
"speech": "Hello world!", "braille": "Hello world!", "uninterruptible": True,
|
||||||
@@ -123,7 +135,7 @@ def main():
|
|||||||
programPath = repoRoot / name / "bin" / binary
|
programPath = repoRoot / name / "bin" / binary
|
||||||
check_registration(programPath, name)
|
check_registration(programPath, name)
|
||||||
check_host(repoRoot, programPath, name)
|
check_host(repoRoot, programPath, name)
|
||||||
print("Repository metadata, shortcut registration and actual-host greeting/menu checks passed.")
|
print("Repository metadata, shortcut/settings registration and actual-host greeting/menu/settings checks passed.")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
+3
-4
@@ -8,7 +8,7 @@ With a reader supporting Tentacle settings registration, global Preferences →
|
|||||||
Tentacles → select Wormhole → Settings opens **Wormhole preferences** directly.
|
Tentacles → select Wormhole → Settings opens **Wormhole preferences** directly.
|
||||||
Save persists the two checkboxes and returns to reader preferences; Escape
|
Save persists the two checkboxes and returns to reader preferences; Escape
|
||||||
discards the form's edits. This entry point works without the Wormhole CLI.
|
discards the form's edits. This entry point works without the Wormhole CLI.
|
||||||
Rebuild both the reader and Tentacle to obtain settings registration and the
|
Use Wormhole 0.1.2 and rebuild the reader to obtain settings registration and the
|
||||||
Ctrl+Shift shortcut; the published 0.1.1 binary uses Alt+Shift and has no
|
Ctrl+Shift shortcut; the published 0.1.1 binary uses Alt+Shift and has no
|
||||||
registered settings entry point.
|
registered settings entry point.
|
||||||
|
|
||||||
@@ -110,9 +110,8 @@ interaction = true
|
|||||||
|
|
||||||
The normal installation path is global Preferences → Tentacles → Add repository
|
The normal installation path is global Preferences → Tentacles → Add repository
|
||||||
with `https://git.stormux.org/storm/cthulhu-tentacles`, followed by selecting
|
with `https://git.stormux.org/storm/cthulhu-tentacles`, followed by selecting
|
||||||
Wormhole and Install and enable. Version 0.1.1 downloads use the normal
|
Wormhole and Install and enable. Version 0.1.2 downloads use the normal
|
||||||
`wormhole-v0.1.1` release attachments. Installation becomes available after the
|
[`wormhole-v0.1.2` release attachments](https://git.stormux.org/storm/cthulhu-tentacles/releases/tag/wormhole-v0.1.2). The manifest
|
||||||
prepared archives are uploaded. The manifest
|
|
||||||
requests presentation and interaction permissions. Local metadata above is an
|
requests presentation and interaction permissions. Local metadata above is an
|
||||||
optional development path.
|
optional development path.
|
||||||
Prepare amd64/arm64 archives with
|
Prepare amd64/arm64 archives with
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ format-version = 1
|
|||||||
id = "wormhole"
|
id = "wormhole"
|
||||||
name = "Wormhole"
|
name = "Wormhole"
|
||||||
description = "Send a focused line or clipboard item and receive files, folders, and text with Magic Wormhole."
|
description = "Send a focused line or clipboard item and receive files, folders, and text with Magic Wormhole."
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
authors = ["Storm Dragon"]
|
authors = ["Storm Dragon"]
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
source = "https://git.stormux.org/storm/cthulhu-tentacles"
|
source = "https://git.stormux.org/storm/cthulhu-tentacles"
|
||||||
|
|||||||
Reference in new issue
Block a user