launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29926
[Merge] ~cjwatson/lpci:rename-warning into lpci:old-lpcraft
Colin Watson has proposed merging ~cjwatson/lpci:rename-warning into lpci:old-lpcraft.
Commit message:
Display notice advising users to switch to lpci
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/lpci/+git/lpci/+merge/441332
Snaps don't really support being renamed. This is the next best thing.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lpci:rename-warning into lpci:old-lpcraft.
diff --git a/NEWS.rst b/NEWS.rst
index a422ffe..12c785c 100644
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -2,6 +2,11 @@
Version history
===============
+0.0.52.1 (unreleased)
+=====================
+
+- Display notice advising users to switch to ``lpci``.
+
0.0.52 (2023-04-06)
===================
- Fix regression from adding support to snap keys
diff --git a/lpcraft/main.py b/lpcraft/main.py
index fd08566..29cb4ab 100644
--- a/lpcraft/main.py
+++ b/lpcraft/main.py
@@ -51,6 +51,10 @@ def main(argv: Optional[List[str]] = None) -> int:
argv = sys.argv[1:]
emit.init(EmitterMode.BRIEF, "lpcraft", f"Starting {lpcraft_version}")
+ emit.message(
+ "lpcraft has been replaced by lpci. "
+ "Run `sudo snap install --classic lpci` to install it."
+ )
command_groups = [CommandGroup("Basic", _basic_commands)]
summary = "Run Launchpad CI jobs."
extra_global_args = [
diff --git a/lpcraft/tests/test_main.py b/lpcraft/tests/test_main.py
index d043637..369325c 100644
--- a/lpcraft/tests/test_main.py
+++ b/lpcraft/tests/test_main.py
@@ -24,7 +24,15 @@ class TestMain(TestCase):
mock_emit.init.assert_called_once_with(
EmitterMode.BRIEF, "lpcraft", f"Starting {lpcraft_version}"
)
- mock_emit.message.assert_called_once_with(lpcraft_version)
+ mock_emit.message.assert_has_calls(
+ [
+ call(
+ "lpcraft has been replaced by lpci. "
+ "Run `sudo snap install --classic lpci` to install it."
+ ),
+ call(lpcraft_version),
+ ]
+ )
mock_emit.ended_ok.assert_called_once_with()
@patch("sys.stderr", new_callable=io.StringIO)
diff --git a/setup.cfg b/setup.cfg
index 2045068..f8a79cf 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = lpcraft
-version = 0.0.52
+version = 0.0.52.1.dev0
description = Runner for Launchpad CI jobs
long_description = file: README.rst
long_description_content_type = text/x-rst