diff --git a/CHANGELOG.md b/CHANGELOG.md index c0f24bc..38ff2f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,14 @@ Ret2CLI 的所有重要变更将记录在此文件中。格式基于 [Keep a Cha ## [Unreleased] +## [3.0.0] - 2026-10-17 - Solivault + +### Changed + +- 启用 v3.0.x 发布线,版本代号为 `Solivault`,同步更新命令行版本信息与发布附件展示名 +- 升级 `dirs` 至 7、`tabled` 至 0.22,并更新 clap、clap_complete、tokio、termimad、rustls、serde_json、winresource 等依赖 +- 更新 Nix flake 锁定依赖,精简 README 并调整中文项目介绍 + ## [2.0.0] - 2026-08-05 - TearJerker ### Added diff --git a/Cargo.lock b/Cargo.lock index f00c00c..96cf488 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -179,9 +179,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.5" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301b56658598e48f3648647ac6fc887be7e7108eddfa4e9b63fcf3ec58c0cadf" +checksum = "aa8876b300ab35ba921adea3dfd70157a46249b33f95c9084ae5709785478946" dependencies = [ "clap_builder", "clap_derive", @@ -189,9 +189,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.5" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94a65403d1a1bd28f7dc68eb8506e8874808ee5eecb59298de588e2e1407a078" +checksum = "ec0797fb7aeb1406c84efac526901f7ec3ead2124f946b494e72879d4b54704d" dependencies = [ "anstream", "anstyle", @@ -201,18 +201,18 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.6.8" +version = "4.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f84a88507dbd05c695f2cb5e8558e747179134005e9893882dec964190ed89" +checksum = "037e2a1a92236d0aff7e845093f64661d6df4c02c9fcc61a60e9e1d736fa392f" dependencies = [ "clap", ] [[package]] name = "clap_derive" -version = "4.6.4" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" +checksum = "f9c751b79415d4e559e3d1fcf128e09e720eb673a06d26cf6f392d37d75b66e0" dependencies = [ "heck", "proc-macro2", @@ -449,9 +449,9 @@ dependencies = [ [[package]] name = "dirs" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +checksum = "8d57d423b3c82e89b9a24ca3091fee61f456a26edbd28d26c65906f4bc1dcd8f" dependencies = [ "dirs-sys", ] @@ -573,44 +573,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" +checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e" [[package]] name = "futures-io" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" +checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed" [[package]] name = "futures-macro" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" +checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "futures-sink" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" +checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d" [[package]] name = "futures-task" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" +checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd" [[package]] name = "futures-util" -version = "0.3.33" +version = "0.3.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" +checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc" dependencies = [ "futures-core", "futures-io", @@ -1174,28 +1174,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "proc-macro-error-attr2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" -dependencies = [ - "proc-macro2", - "quote", -] - -[[package]] -name = "proc-macro-error2" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" -dependencies = [ - "proc-macro-error-attr2", - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "proc-macro2" version = "1.0.107" @@ -1395,7 +1373,7 @@ dependencies = [ [[package]] name = "ret2cli" -version = "2.0.0" +version = "3.0.0" dependencies = [ "base64 0.23.1", "chrono", @@ -1489,9 +1467,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.43" +version = "0.23.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0283386ce02abc0151e1761d08802dfe86c173b0b494af5cbc086574e453da06" +checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf" dependencies = [ "once_cell", "ring", @@ -1513,9 +1491,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.13" +version = "0.103.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" +checksum = "f3c3cf1d8b1e7d4927e2d154c3fcb02979afb9939629c62cd9048d4f07b60ac2" dependencies = [ "ring", "rustls-pki-types", @@ -1597,9 +1575,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.151" +version = "1.0.154" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" +checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6" dependencies = [ "itoa", "memchr", @@ -1610,9 +1588,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" +checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c" dependencies = [ "serde_core", ] @@ -1768,9 +1746,9 @@ dependencies = [ [[package]] name = "tabled" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5dc662e6da844ad6e428ad16b57967c9d33c82e16bb1c258326c0c078605dff" +checksum = "2d2596a104db1900b943f97d793a6c99addca918c4525c999f751a0f17d472eb" dependencies = [ "papergrid", "tabled_derive", @@ -1779,12 +1757,11 @@ dependencies = [ [[package]] name = "tabled_derive" -version = "0.11.0" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ea5d1b13ca6cff1f9231ffd62f15eefd72543dab5e468735f1a456728a02846" +checksum = "7dca1937322a1e892b1a65f6a6736183bb0a29d3b4234d1d53bc436dff9beb76" dependencies = [ "heck", - "proc-macro-error2", "proc-macro2", "quote", "syn 2.0.119", @@ -1805,9 +1782,9 @@ dependencies = [ [[package]] name = "termimad" -version = "0.35.1" +version = "0.35.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53d4b1294b87e81925b7ae7f8f4d000376e3a5b3349d978429665428a793fcb" +checksum = "092b11fb38404fa873f019f8e5f300fa5787f381b7a58b923546d94b5a9065fd" dependencies = [ "coolor", "crokey", @@ -1830,18 +1807,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.19" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.19" +version = "2.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", @@ -1875,9 +1852,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.53.1" +version = "1.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" +checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044" dependencies = [ "bytes", "libc", @@ -1926,9 +1903,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.4+spec-1.1.0" +version = "1.1.8+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" +checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d" dependencies = [ "indexmap", "serde_core", @@ -1941,27 +1918,27 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.1.1+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" +checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" dependencies = [ "serde_core", ] [[package]] name = "toml_parser" -version = "1.1.3+spec-1.1.0" +version = "1.1.5+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" +checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" +checksum = "06bdbd8cfc056b8d2e2e85f29b56a3bdbecb527cef81eb39e3e7b98af4652770" [[package]] name = "tower" @@ -2397,9 +2374,9 @@ checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" [[package]] name = "winresource" -version = "0.1.31" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0986a8b1d586b7d3e4fe3d9ea39fb451ae22869dcea4aa109d287a374d866087" +checksum = "a2bc6d36480b829272a5bdabf08e6dca8004761c1da7e35efef800540c66221b" dependencies = [ "toml", "version_check", diff --git a/Cargo.toml b/Cargo.toml index 876d75e..52d95d0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ret2cli" -version = "2.0.0" +version = "3.0.0" edition = "2024" rust-version = "1.89" authors = ["LyCecilion "] @@ -42,14 +42,14 @@ serde_json = "1" toml = "1.1" thiserror = "2" tokio = { version = "1", features = ["full"] } -tabled = "0.21" +tabled = "0.22" termimad = "0.35" colored = "3" chrono = { version = "0.4", features = ["serde"] } ring = "0.17" hex = "0.4" base64 = "0.23" -dirs = "6" +dirs = "7" rpassword = "7" dialoguer = "0.12" indicatif = "0.18" diff --git a/README.md b/README.md index d2819ba..123639f 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,7 @@ # 🚩 Ret2CLI 🖥 -CLI client for [Ret2Shell](https://github.com/ret2shell/ret2shell) CTF platform. - -[![Typing SVG](https://readme-typing-svg.demolab.com?font=Cascadia+Code&duration=3000&pause=1000¢er=true&vCenter=true&height=40&lines=%E5%A3%B0%E9%AB%98%E3%82%89%E3%81%8B%E3%81%AB%E3%80%81%E5%AE%A3%E8%AA%93%E5%B8%83%E5%91%8A%E3%81%A0;%E5%A4%96%E9%87%8E%E3%81%AF%E3%81%84%E3%82%89%E3%81%AA%E3%81%84;%E6%8C%87%E5%92%A5%E3%81%88%E3%81%A6%E3%81%8A%E9%9D%99%E3%81%8B%E3%81%AB;%E6%84%9B%E3%82%92%E7%9F%A5%E3%82%89%E3%81%AA%E3%81%84%E6%99%82%E4%BB%A3%E3%81%AF%E3%81%84%E3%82%89%E3%81%AA%E3%81%84;%E3%81%A8%E3%81%8D%E3%82%81%E3%81%8B%E3%81%9B%E3%81%A6+NewType)](https://git.io/typing-svg) +[Ret2Shell](https://github.com/ret2shell/ret2shell) CTF 平台的 CLI 客户端 @@ -16,20 +14,17 @@ CLI client for [Ret2Shell](https://github.com/ret2shell/ret2shell) CTF platform. > > **免责声明 / DISCLAIMER** > -> 1. 该项目的代码 **完全** 使用 AI 生成,文档亦有 AI 辅助构建。参与的 Agent 包含 GPT-5.6 Sol 和 DeepSeek V4 Flash 0731。我们使用严格的 Harness 和单元测试保证 AI 生成的代码尽可能符合我们的预期,对代码和文档进行了 review 并人工测试了几乎所有功能,但并不保证代码的完善。 -> 2. 该项目与 Ret2Shell 实例的通信逻辑依照其官方文档和 Ret2Shell 源码。Ret2CLI 仅对官方 Ret2Shell 实例的通信进行了适配;若目标 Ret2Shell 实例安装了插件或进行了第三方配置,其行为可能发生变化,我们不对此情形做出功能性的担保。 -> 3. Ret2CLI **不会官方实现** 任何可能破坏比赛公平性的功能,如自动接入 AI 工具解题、爆破 Flag 等。 -> -> 该项目为 Project Hazelita 社群共创项目。 +> 1. . 该项目与 Ret2Shell 实例的通信逻辑依照其官方文档和 Ret2Shell 源码。Ret2CLI 仅对官方 Ret2Shell 实例的通信进行了适配;若目标 Ret2Shell 实例安装了插件或进行了第三方配置,其行为可能发生变化,我们不对此情形做出功能性的担保。 +> 2. Ret2CLI **不会官方实现** 任何可能破坏比赛公平性的功能,如自动接入 AI 工具解题、爆破 Flag 等。 > -## 📖 About +## 📖 关于 Ret2CLI 是适用于 [Ret2Shell](https://github.com/ret2shell/ret2shell) CTF 平台的 CLI 客户端,目标定位类似于 `gh` 之于 GitHub:让选手在终端内完成从登录、选赛、看题、提交 Flag 到管理队伍的全部流程,无须打开浏览器。 Ret2CLI 采用与 Ret2Shell 相同的 Rust 技术栈,行为语义、均对照 Ret2Shell 服务端源码实现。 -## ✨ Features +## ✨ 特性 Ret2CLI 具有部分在浏览器中无法获得的使用体验,包括但不限于: @@ -37,7 +32,7 @@ Ret2CLI 具有部分在浏览器中无法获得的使用体验,包括但不限 - **终端内完成赛事:** 查看比赛与排行榜、浏览题目、提交 Flag、下载附件、管理队伍与查看提交记录,全程无需离开终端。 - **交互式 REPL 和 JSON 输出:** 采用类解释器的命令提示符,与 one-line 子命令共用同一套语法;全局 `--json` 模式让 stdout 只输出一个 JSON 值,做到人类和脚本友好。 -## 👀 Preview +## 👀 预览 下面的 GIF 录制于 Ret2CLI 的开发阶段。正式版和开发版可能有部分差异。 @@ -51,9 +46,7 @@ agg --text-font-family "Maple Mono NF CN" --font-size 20 --line-height 1.2 --spe --> -## 🚀 Quick Start - -## 📦 Manual Installation +## 🚀 快速开始 你可以手动安装 Ret2CLI。从 [Releases](https://github.com/LyCecilion/ret2cli/releases) 中取得 Windows x86_64、Linux x86_64/AArch64 或 macOS Intel/Apple Silicon 的压缩包后,可以直接使用其中的二进制文件或将其加入 PATH。 @@ -91,11 +84,11 @@ nix build .#ret2cli ./result/bin/ret2cli ``` -## 📝 Usage +## 📝 使用指南 完整使用指南参见 [USAGE](./USAGE.md)。 -## ⚙️ Configuration +## ⚙️ 配置 配置文件默认位于各平台的用户配置目录: @@ -140,7 +133,7 @@ editor = "vim" # 编辑器。将会被 `$VISUAL/$EDITOR` 覆盖。 对于同一个配置项,命令行参数优先于环境变量,环境变量优先于配置文件。在三者均缺省时采用默认值。 -## 📁 Project Structure +## 📁 项目架构 ```text ret2cli/ @@ -169,9 +162,9 @@ ret2cli/ └── LICENSE MIT ``` -## 💻 Development +## 💻 开发 -可参考 [上文](#-manual-installation) 安装 Rust 1.89+ 工具链。 +可参考 [上文](#-快速开始) 安装 Rust 1.89+ 工具链。 | 命令 | 说明 | | --- | --- | @@ -188,7 +181,7 @@ ret2cli/ 同一 `major.minor` 发布线共享 codename。正式 CI 编译的程序版本还会附加 `+build...g`,tag 与 Cargo.toml 则保持纯 SemVer。 -## 🧪 Testing +## 🧪 测试 测试全部为单元测试(`cargo test`),分布在各个模块的 `#[cfg(test)]` 中,覆盖: @@ -208,12 +201,10 @@ cargo test 参见 [CHANGELOG](./CHANGELOG.md)。 -## 🤝 Contributing +## 🤝 贡献 参见 [CONTRIBUTING](./CONTRIBUTING.md)。 -## 🙏 Acknowledgments - -## 📄 License +## 📄 许可证 本项目使用 [MIT LICENSE](./LICENSE)。 diff --git a/dist-workspace.toml b/dist-workspace.toml index c4fa48d..0b3730f 100644 --- a/dist-workspace.toml +++ b/dist-workspace.toml @@ -5,8 +5,8 @@ members = ["cargo:."] [dist] # The preferred dist version to use in CI (Cargo.toml SemVer syntax) cargo-dist-version = "0.32.0" -# Human-facing name used throughout the v2.0.x release line. -display-name = "Ret2CLI - TearJerker" +# Human-facing name used throughout the v3.0.x release line. +display-name = "Ret2CLI - Solivault" # CI backends to support ci = "github" # Whether CI should trigger releases with dispatches instead of tag pushes diff --git a/flake.lock b/flake.lock index 6ef8ba7..9080fac 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1785314864, - "narHash": "sha256-imz9J5iMNersDeQ1ymenFg35N6C2R3MCaGg2i0XCIrE=", + "lastModified": 1792232679, + "narHash": "sha256-qH046WSPn7A97UyNSZdiPobVf3E9Q9zPKdW8nYHHx+Q=", "owner": "nix-community", "repo": "fenix", - "rev": "594418b2c9ea0731bee6988236ef5bfd97e81dca", + "rev": "8926ac637672b2d2e9afde568b1448853e5bcbaf", "type": "github" }, "original": { @@ -26,11 +26,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1791914995, + "narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544", "type": "github" }, "original": { @@ -41,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1785090369, - "narHash": "sha256-m0pDuRJG7EDo9ri+4Ksu83VsI+PlxNC9lNBfydejce4=", + "lastModified": 1791956154, + "narHash": "sha256-jBYGPi4udQ9uo4KQp9m2J0546nJVQitG15gvZSaVVAs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "624af665418d3c65d544145b4d34ad696439570e", + "rev": "55bfb4d7437bd4e09ab7cba58a43bd68eb310044", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1785261141, - "narHash": "sha256-sA+DHPejWD68mLA7gtTiHGd5T41F6W+NKf0g+ibFCW4=", + "lastModified": 1792141191, + "narHash": "sha256-H161gJK9JlpkP3bGnsbTdzzRcP51oiFYrHbCdsQH4kc=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "bec66814323579659ffd77c909b3d963af118ece", + "rev": "70e0c46be740a471bcc95f2be290f4bbfdcffd87", "type": "github" }, "original": { diff --git a/release.rs b/release.rs index c4cd813..9ae4ba7 100644 --- a/release.rs +++ b/release.rs @@ -5,6 +5,7 @@ pub fn codename_for_version(package_version: &str) -> Option<&'static str> { (Some("1"), Some("0")) => Some("LORELEI"), (Some("1"), Some("1")) => Some("Bloom in Two"), (Some("2"), Some("0")) => Some("TearJerker"), + (Some("3"), Some("0")) => Some("Solivault"), _ => None, } } @@ -53,12 +54,20 @@ mod tests { } #[test] + fn tear_jerker_covers_the_entire_v2_0_release_line() { assert_eq!(codename_for_version("2.0.0"), Some("TearJerker")); assert_eq!(codename_for_version("2.0.42"), Some("TearJerker")); assert_eq!(codename_for_version("2.0.1-beta.1"), Some("TearJerker")); } + #[test] + fn solivault_covers_the_entire_v3_0_release_line() { + assert_eq!(codename_for_version("3.0.0"), Some("Solivault")); + assert_eq!(codename_for_version("3.0.42"), Some("Solivault")); + assert_eq!(codename_for_version("3.0.1-beta.1"), Some("Solivault")); + } + #[test] fn a_new_release_line_requires_an_explicit_codename() { assert_eq!(codename_for_version("1.2.0"), None);