From c33446b481351009fc16335cbcd66ff2c2b7985e Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 6 Apr 2020 17:28:48 -0700 Subject: [PATCH] Generate changelog from git history type: development pr: https://github.com/casey/intermodal/pull/337 fixes: - https://github.com/casey/intermodal/issues/336 --- CHANGELOG.md | 329 +++++++++++++++++---------------- Cargo.lock | 203 +++++++++++++++++++- Cargo.toml | 6 +- bin/changelog/Cargo.toml | 25 +++ bin/changelog/src/changelog.rs | 100 ++++++++++ bin/changelog/src/common.rs | 20 ++ bin/changelog/src/entry.rs | 86 +++++++++ bin/changelog/src/kind.rs | 18 ++ bin/changelog/src/main.rs | 18 ++ bin/changelog/src/metadata.rs | 74 ++++++++ bin/changelog/src/opt.rs | 29 +++ bin/changelog/src/release.rs | 29 +++ 12 files changed, 770 insertions(+), 167 deletions(-) create mode 100644 bin/changelog/Cargo.toml create mode 100644 bin/changelog/src/changelog.rs create mode 100644 bin/changelog/src/common.rs create mode 100644 bin/changelog/src/entry.rs create mode 100644 bin/changelog/src/kind.rs create mode 100644 bin/changelog/src/main.rs create mode 100644 bin/changelog/src/metadata.rs create mode 100644 bin/changelog/src/opt.rs create mode 100644 bin/changelog/src/release.rs diff --git a/CHANGELOG.md b/CHANGELOG.md index b8edfdb..2aa6406 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,175 +2,180 @@ Changelog ========= -[v0.1.1] - 2020-3-27 --------------------- - -### Added -- Generate man page with from `--help` with `help2man` (#301) -- Add shell completion scripts (#299) - -### Misc -- Remove errant torrent file (#294) +UNRELEASED - 2020-04-08 +----------------------- +- :wrench: [`xxxxxxxxxxxx`](https://github.com/casey/intermodal/commits/master) Generate changelog from git history ([#337](https://github.com/casey/intermodal/pull/337)) - Fixes [#336](https://github.com/casey/intermodal/issues/336) - _Casey Rodarmor _ +- :art: [`6edab1fa3fa8`](https://github.com/casey/intermodal/commit/6edab1fa3fa8461ac4ca02466a04b0f14e42dfc0) Use `TestEnv::assert_ok` everywhere - Fixes [#330](https://github.com/casey/intermodal/issues/330) - _Casey Rodarmor _ +- :zap: [`8e3f5516aff8`](https://github.com/casey/intermodal/commit/8e3f5516aff8c89289203a2bc1b46505410c5f1f) Use attractive paths in user-facing messages - Fixes [#252](https://github.com/casey/intermodal/issues/252), [#332](https://github.com/casey/intermodal/issues/332) - _Casey Rodarmor _ +- :bug: [`1cfc0214536c`](https://github.com/casey/intermodal/commit/1cfc0214536c607fff7c29d9e878cbcd7f3a9ffc) Forbid empty input, output, and path targets - _Casey Rodarmor _ +- :sparkles: [`c23b0635ee25`](https://github.com/casey/intermodal/commit/c23b0635ee25b9d081ec1d5848ee166b1ea225d8) Add ability to create single-file torrents from stdin - _Eric Siegel _ +- :wrench: [`796024bec9a0`](https://github.com/casey/intermodal/commit/796024bec9a0e94e9de2b1f876c99b151e107ead) Split automerge functionality into `merge` recipe - _Casey Rodarmor _ +- :books: [`4aa8f47da5d8`](https://github.com/casey/intermodal/commit/4aa8f47da5d8c4d997db71b3df3c93567a03e09d) Add "Metadata/Prior Art" section to book - _Casey Rodarmor _ +- :wrench: [`4c90bc41c3a2`](https://github.com/casey/intermodal/commit/4c90bc41c3a2ab9d8854759dd74beb048b4dfe8d) Rewrite `pr` recipe to merge when CI passes - _Casey Rodarmor _ +- :wrench: [`b16da8da5a85`](https://github.com/casey/intermodal/commit/b16da8da5a8589433bd2a70d575cfa5c7cf6c1a1) Rewrite `done` recipe for new merge workflow - _Casey Rodarmor _ +- :books: [`9d43fa427597`](https://github.com/casey/intermodal/commit/9d43fa42759731f2e35994b8987a634797e16ee2) Fix link to rodarmor's PGP key in readme - _Casey Rodarmor _ +- :books: [`543524b96de4`](https://github.com/casey/intermodal/commit/543524b96de47704a701f04d2be47448231a72f3) Mention signature policy in readme - _Casey Rodarmor _ +- :art: [`f17527e58ee6`](https://github.com/casey/intermodal/commit/f17527e58ee6f3718576929e2a9abbeca1b984ab) Use single-quoted strings in justfile - _Casey Rodarmor _ +- :wrench: [`25153990817f`](https://github.com/casey/intermodal/commit/25153990817f93a65147125c659703164323ca39) Cache build artifacts - _Casey Rodarmor _ +- :books: [`83ee172b72cf`](https://github.com/casey/intermodal/commit/83ee172b72cf21c6c9e692888e0304ff88cf42e0) Create section for bittorrent book chapters - _Casey Rodarmor _ +- :books: [`2ba24bb98528`](https://github.com/casey/intermodal/commit/2ba24bb98528e86be722a09950016908987fccfa) Add description of UDP tracker protocol to book - _Casey Rodarmor _ +- :books: [`57e482f4b32b`](https://github.com/casey/intermodal/commit/57e482f4b32bba52e701d8631272db83f2c23f2c) Record demo for readme - _Casey Rodarmor _ +- :books: [`a5e127318747`](https://github.com/casey/intermodal/commit/a5e1273187472f5762b11339d46cebffcf211168) Update man page with new version number - _Casey Rodarmor _ -[v0.1.0] - 2020-3-27 --------------------- - -### Added -- Allow sorting files in torrents (#287) - -### Changed -- Introduce "sort specs" to allow fine-grained sorting of files in torrents (#292) -- Use `open` crate to open files and URLs (#270) - -### Misc -- Use `strum` crate to derive enum↔string conversions (#291) -- List supported OSs in readme (#290) -- Link to blog post in readme (#289) -- Add `cargo install cargo-watch` to dev-deps recipe (#285) -- Fix condition in GHA workflow (#284) -- Only deploy site during linux run of CI build (#282) -- Go back to sans-serif `I` in site logo (#283) -- Use serifed `I` for intermodal on site (#281) -- Add glow to `intermodal` letters on site (#279) -- Improve readme intro (#278) -- Add links to site (#277) -- Rename `www/head` to `www/head.txt` (#275) -- Record current git revision in `www/head` (#274) -- Merge Github Actions workflows (#273) -- Deny warnings in GitHub Actions main workflow build (#272) -- Improve book (#271) -- Add GitHub Actions workflow to build book and push to github pages (#269) -- Fix build errors (#267) -- Add additional documents to release archive (#266) +[v0.1.1](https://github.com/casey/intermodal/releases/tag/v0.1.1) - 2020-04-08 +------------------------------------------------------------------------------ +- :bookmark: [`93c23d29f24b`](https://github.com/casey/intermodal/commit/93c23d29f24be5750744b1a65d93f96d86e73862) Release v0.1.1 - _Casey Rodarmor _ +- :books: [`3131b0d56c7f`](https://github.com/casey/intermodal/commit/3131b0d56c7f472916d3a5e34402f94adddbf4d0) Generate man page with from `--help` with `help2man` - _Casey Rodarmor _ +- :sparkles: [`8c30205b0263`](https://github.com/casey/intermodal/commit/8c30205b02634c713f734f016b3ea8ca2f4b9555) Add shell completion scripts - _Casey Rodarmor _ +- :art: [`e69c65a38b6a`](https://github.com/casey/intermodal/commit/e69c65a38b6a6b8683123976731cebb98125946a) Remove errant torrent file - _Casey Rodarmor _ -[v0.0.3] - 2020-3-18 --------------------- - -### Misc -- Fix release process issues (#264) +[v0.1.0](https://github.com/casey/intermodal/releases/tag/v0.1.0) - 2020-04-08 +------------------------------------------------------------------------------ +- :bookmark: [`328a3adeafe3`](https://github.com/casey/intermodal/commit/328a3adeafe385fb281a580cf585ee9a6ebbeaf3) Release v0.1.0 - _Casey Rodarmor _ +- :sparkles: [`97018031c1ab`](https://github.com/casey/intermodal/commit/97018031c1abaaf12c1cdc8f645aa9417c1937c8) Introduce "sort specs" to allow fine-grained sorting of files in torrents - _Casey Rodarmor _ +- :art: [`362a81d42fb9`](https://github.com/casey/intermodal/commit/362a81d42fb9e703f70330b007b701812a22aef5) Use `strum` crate to derive enum↔string conversions - _Casey Rodarmor _ +- :books: [`6996d1a3eac8`](https://github.com/casey/intermodal/commit/6996d1a3eac88dc3ba1a2e73063d468867ac5b76) List supported OSs in readme - _Casey Rodarmor _ +- :books: [`4f7eead16a9a`](https://github.com/casey/intermodal/commit/4f7eead16a9ac0b659930322cc43c752ec91d74b) Link to blog post in readme - _Casey Rodarmor _ +- :sparkles: [`1cd6c276fdf7`](https://github.com/casey/intermodal/commit/1cd6c276fdf795d916ba78d09c4d9e5e3ff992d0) Allow sorting files in torrents - _Eric _ +- :wrench: [`687a863b45a5`](https://github.com/casey/intermodal/commit/687a863b45a53a01aff431b49b288b88420e92fb) Add `cargo install cargo-watch` to dev-deps recipe - _Casey Rodarmor _ +- :package: [`4b6191773aab`](https://github.com/casey/intermodal/commit/4b6191773aabd445551820ed338c77d907d723c2) Fix condition in GHA workflow - _Casey Rodarmor _ +- :wrench: [`b27ecf1c09d6`](https://github.com/casey/intermodal/commit/b27ecf1c09d686c81893ddead727dd15eec5b143) Only deploy site during linux run of CI build - _Casey Rodarmor _ +- :books: [`b6cb3d389c98`](https://github.com/casey/intermodal/commit/b6cb3d389c987dd60d4234a8004a2d68d89a120f) Go back to sans-serif `I` in site logo - _Casey Rodarmor _ +- :books: [`ef1acd58c105`](https://github.com/casey/intermodal/commit/ef1acd58c105b2c2e16cf394695f8699b28ec46f) Use serifed `I` for intermodal on site - _Casey Rodarmor _ +- :books: [`4fc0f508e6a0`](https://github.com/casey/intermodal/commit/4fc0f508e6a0d6b781a770a4e4b5be146e951929) Add glow to `intermodal` letters on site - _Casey Rodarmor _ +- :books: [`89e97144e958`](https://github.com/casey/intermodal/commit/89e97144e958dd7277dcda0185e08e52e22548e8) Improve readme intro - _Casey Rodarmor _ +- :books: [`6d5f489f1934`](https://github.com/casey/intermodal/commit/6d5f489f19347c56edc9562855215e7a2ed413ae) Add links to site - _Casey Rodarmor _ +- :zap: [`6328118c0052`](https://github.com/casey/intermodal/commit/6328118c0052ffbc40a6f300cb2f18e315680558) Use `open` crate to open files and URLs - _Casey Rodarmor _ +- :books: [`35d90adab4fd`](https://github.com/casey/intermodal/commit/35d90adab4fdc1e931e9a0a6c44cad36f8df2e6b) Rename `www/head` to `www/head.txt` - _Casey Rodarmor _ +- :books: [`0469f7fecd29`](https://github.com/casey/intermodal/commit/0469f7fecd296c9e0ac2360a71c81ae7c3462f1e) Record current git revision in `www/head` - _Casey Rodarmor _ +- :wrench: [`972a1ec6288c`](https://github.com/casey/intermodal/commit/972a1ec6288c94ca851eb0d83b509b3bc4d200b7) Merge Github Actions workflows - _Casey Rodarmor _ +- :white_check_mark: [`151d912156c7`](https://github.com/casey/intermodal/commit/151d912156c76dbda271a1c2b6e1a1861f32be04) Deny warnings in GitHub Actions main workflow build - _Casey Rodarmor _ +- :books: [`e91b419af532`](https://github.com/casey/intermodal/commit/e91b419af5323c7b7d5ed3c0b9a180d91b74b502) Improve book - _Casey Rodarmor _ +- :wrench: [`1e5c19d02b5d`](https://github.com/casey/intermodal/commit/1e5c19d02b5d770a3270f850420fbebc5a95dbf6) Add GitHub Actions workflow to build book and push to github pages - _Casey Rodarmor _ +- :bug: [`b96c27e9b123`](https://github.com/casey/intermodal/commit/b96c27e9b123f8182355e9f0451857d594871ce6) Fix build errors - _Casey Rodarmor _ +- :package: [`4cbeca802ac2`](https://github.com/casey/intermodal/commit/4cbeca802ac207a13ce8099e3521d2cc15e878bd) Add additional documents to release archive - _Casey Rodarmor _ -[v0.0.2] - 2020-3-18 --------------------- +[v0.0.3](https://github.com/casey/intermodal/releases/tag/v0.0.3) - 2020-04-08 +------------------------------------------------------------------------------ +- :bookmark: [`5d4baa22eacb`](https://github.com/casey/intermodal/commit/5d4baa22eacb953941d9ad3ba937ea854f15015d) Release v0.0.3 - _Casey Rodarmor _ +- :package: [`86aeec3ce90f`](https://github.com/casey/intermodal/commit/86aeec3ce90f9e62fde842cf3a2f71e8e972842d) Fix release process issues - _Casey Rodarmor _ -### Added -- Allow reading torrent metainfo from stdin (#262) -- Skip torrent file creation with `imdl torrent create --dry-run` (#260) -- Print magnet link to stdout with `--link` (#258) -- Allow opening magnet links after creation (#250) -- Allow creating magnet links with `imdl torrent link` (#248) -- Add piece hashing progress bar (#214) -- Add progress messages to `imdl torrent create` (#213) -- Support adding DHT bootstrap nodes to created torrents (#169) -- Add initial implementation of `imdl torrent verify` -- Display torrent file tree (#153) -- Allow including and excluding files from torrent with globs (#151) -- Support creating multi-file torrents (#148) -- Don't overwrite destination torrent without `--force` (#146) -- Select piece length when none is provided (#144) -- Add source to generated torrent with `--source` (#141) -- Add `imdl torrent show` (#138) -### Changed -- Add name and peers to magnet links (#249) -- Print correct and incorrect MD5 checksums in color (#243) -- Print individual file torrent verification errors (#236) -- Add progress messages and bar to `imdl torrent verify` (#230) -- Style `imdl torrent create` progress messages (#227) -- Only write spinner and progress bar when connected to terminal (#219) -- Fail early if destination .torrent file exists (#220) -- Improve spinner and progress bar (#218) -- Only show torrent summary on create with `--show` (#216) -- Make table names more greppable (#215) -- Improve `imdl torrent create` flags (#208) -- Add short flags to `imdl torrent {show,verify}` (#205) -- Remove `long_help` in favor of `help` (#201) -- Fix torrent verify about message (#172) -- Don't display tier labels if tiers only contain a single entry (#156) -- Show files in single-file mode (#154) -- Skip hidden files, symlinks, and junk in created torrents (#149) -- Write torrent to stdout if `-` is passed to `--output` (#145) -- Improve torrent display formatting (#142) -- Show information about torrents after creation (#140) -- Restrict piece length (#136) -- Accept `--piece-length` arguments with SI units (#134) -- Update install instructions to new domain (#122) +[v0.0.2](https://github.com/casey/intermodal/releases/tag/v0.0.2) - 2020-04-08 +------------------------------------------------------------------------------ +- :bookmark: [`8b3954ff9965`](https://github.com/casey/intermodal/commit/8b3954ff996590fd8b30c6bbcd734ec94f07d644) Release v0.0.2 - _Casey Rodarmor _ +- :sparkles: [`498549b35c2f`](https://github.com/casey/intermodal/commit/498549b35c2fcc6cc7f10019cad15aaea2785dfb) Allow reading torrent metainfo from stdin - _Casey Rodarmor _ +- :sparkles: [`1c84172ad48a`](https://github.com/casey/intermodal/commit/1c84172ad48a7b9a8a59e91d28594026c520440c) Skip torrent file creation with `imdl torrent create --dry-run` - _Casey Rodarmor _ +- :wrench: [`7e3a53ce52de`](https://github.com/casey/intermodal/commit/7e3a53ce52deaf51eeb755b86034a4f171380dc5) Make `just done` default to current branch - _Casey Rodarmor _ +- :sparkles: [`0d7c1c0c279e`](https://github.com/casey/intermodal/commit/0d7c1c0c279e0bca1e1f68a2ef653b5151b7516a) Print magnet link to stdout with `--link` - _Casey Rodarmor _ +- :books: [`901fa150ff54`](https://github.com/casey/intermodal/commit/901fa150ff545c67e230f89ca6a66ae5867005c9) Indicate BEP 9 support in readme - _Casey Rodarmor _ +- :sparkles: [`d8055c6e6a6c`](https://github.com/casey/intermodal/commit/d8055c6e6a6ca84b87e504a5cf88e9c84c869191) Allow opening magnet links after creation - _Casey Rodarmor _ +- :sparkles: [`aeb9d8b31721`](https://github.com/casey/intermodal/commit/aeb9d8b31721ad5b4bfe042d3779be7d5007dd6c) Add name and peers to magnet links - _Casey Rodarmor _ +- :sparkles: [`57a358e4580f`](https://github.com/casey/intermodal/commit/57a358e4580f6e2c07e10bf095e7b14c6a50ea70) Allow creating magnet links with `imdl torrent link` - _Casey Rodarmor _ +- :books: [`0b486cc6817c`](https://github.com/casey/intermodal/commit/0b486cc6817ccb4993e67cdb565dd24cca09d9f9) Update BEP list in readme with new issue links - _Casey Rodarmor _ +- :zap: [`3257614c4fff`](https://github.com/casey/intermodal/commit/3257614c4fff99470839ac503c544a3e0f6bb197) Print correct and incorrect MD5 checksums in color - _Casey Rodarmor _ +- :package: [`1cac9ab9246f`](https://github.com/casey/intermodal/commit/1cac9ab9246faf66419c74e1085d08baa4ffc435) Use imdl-indicatif - _Casey Rodarmor _ +- :white_check_mark: [`0033e8381f59`](https://github.com/casey/intermodal/commit/0033e8381f597a349fa551d3f1a96bdfcb544bba) Test `imdl torrent verify` output - _Casey Rodarmor _ +- :wrench: [`2ea5e0b3840d`](https://github.com/casey/intermodal/commit/2ea5e0b3840df8239ae31a4ad5715df292091d7b) Deny `clippy::too_many_arguments` - _Casey Rodarmor _ +- :zap: [`1532113782ec`](https://github.com/casey/intermodal/commit/1532113782ecb9fb5ca00d9fd0b0bb18c49acd5e) Print individual file torrent verification errors - _Casey Rodarmor _ +- :books: [`f8e3fd594b50`](https://github.com/casey/intermodal/commit/f8e3fd594b505b42c7ff5c72aa67ff9987dc3934) Add explanation paragraph to readme - _Casey Rodarmor _ +- :package: [`f1cc12858cee`](https://github.com/casey/intermodal/commit/f1cc12858cee387d27c63b6cec101a16af44b62f) Use bendy dep from crates.io instead of GitHub - _Casey Rodarmor _ +- :sparkles: [`1daa18ef9a7a`](https://github.com/casey/intermodal/commit/1daa18ef9a7abee47dd60ab7e098667e1f134d89) Add progress messages and bar to `imdl torrent verify` - _Casey Rodarmor _ +- :books: [`5a0bd2dda75b`](https://github.com/casey/intermodal/commit/5a0bd2dda75b3d02765dd3db7cea0cca37fcb9d8) Add braille spinner char explanation and legend - _Casey Rodarmor _ +- :zap: [`2edf8a4fab1e`](https://github.com/casey/intermodal/commit/2edf8a4fab1e49b82c8c7473d33f6494401ea7af) Style `imdl torrent create` progress messages - _Casey Rodarmor _ +- :art: [`8c0d9186079b`](https://github.com/casey/intermodal/commit/8c0d9186079b1ac57b7aedb0a1a83c2f037102d1) Use `concat!(...)` to format braille tick chars - _Casey Rodarmor _ +- :art: [`c3879db06f82`](https://github.com/casey/intermodal/commit/c3879db06f82b7c59e027df918a01899672ef843) Remove `matches` macro - _Casey Rodarmor _ +- :bug: [`bb34936c2ffd`](https://github.com/casey/intermodal/commit/bb34936c2ffd5e4caaea92a91bc132ee117021ed) Only write spinner and progress bar when connected to terminal - _Casey Rodarmor _ +- :zap: [`2cfdad2597d6`](https://github.com/casey/intermodal/commit/2cfdad2597d6f2265c5e7da647138add7cd170be) Fail early if destination .torrent file exists - _Casey Rodarmor _ +- :zap: [`4371bb14023b`](https://github.com/casey/intermodal/commit/4371bb14023bb4f439ab9b10e6c4f9584d62d6f1) Improve spinner and progress bar - _Casey Rodarmor _ +- :art: [`b25b389ae66b`](https://github.com/casey/intermodal/commit/b25b389ae66b38c00f013353a5a0ca97ee08d499) Rename `Target` to `OutputTarget` - _Casey Rodarmor _ +- :zap: [`0de2b1719e55`](https://github.com/casey/intermodal/commit/0de2b1719e5546fa8e23b3c0678fa13f6e658573) Only show torrent summary on create with `--show` - _Casey Rodarmor _ +- :zap: [`06947fd63e87`](https://github.com/casey/intermodal/commit/06947fd63e87e747d26efc3f85580eafb3a10cfa) Make table names more greppable - _Casey Rodarmor _ +- :sparkles: [`bdaec27cafd4`](https://github.com/casey/intermodal/commit/bdaec27cafd49d9d2cecbffdfdbe72a0544d5ffd) Add piece hashing progress bar - _RJ Rybarczyk _ +- :sparkles: [`c6cd78f56594`](https://github.com/casey/intermodal/commit/c6cd78f56594c2c101e678f03e84007cc4b352a6) Add progress messages to `imdl torrent create` - _RJ Rybarczyk _ +- :books: [`2415d88d9256`](https://github.com/casey/intermodal/commit/2415d88d92567ee2a863bb9db96ebdac80769c4e) Add empty book - _Casey Rodarmor _ +- :sparkles: [`21a87a46f330`](https://github.com/casey/intermodal/commit/21a87a46f3301bb5bc737adc321198b790ca4161) Improve `imdl torrent create` flags - _Casey Rodarmor _ +- :sparkles: [`3276f2d043d9`](https://github.com/casey/intermodal/commit/3276f2d043d93d4c478c3187cc2e179f781df049) Add short flags to `imdl torrent {show,verify}` - _Casey Rodarmor _ +- :white_check_mark: [`027b229df112`](https://github.com/casey/intermodal/commit/027b229df112380481d118d6f695796cd483a923) Test piece-hashing edge cases - _Casey Rodarmor _ +- :white_check_mark: [`2b19a6213456`](https://github.com/casey/intermodal/commit/2b19a6213456ac6e93bee389b32ee6991ac6e31b) Test creating torrents from `.` and `..` - _Casey Rodarmor _ +- :books: [`fa6d4e6ad013`](https://github.com/casey/intermodal/commit/fa6d4e6ad0130740359e633b2e59435e366cc13e) Revise command line value names - _Casey Rodarmor _ +- :books: [`cba238470d3c`](https://github.com/casey/intermodal/commit/cba238470d3c615d49284f4015875ff60361d83f) Remove `long_help` in favor of `help` - _Casey Rodarmor _ +- :art: [`4fffa777b4af`](https://github.com/casey/intermodal/commit/4fffa777b4af5afee208cfffb7d6de5b4972aaf6) Refactor Opt into Arguments, Options, and Subcommand - _Casey Rodarmor _ +- :bug: [`eb8efaf52843`](https://github.com/casey/intermodal/commit/eb8efaf52843a41abc40d889c9e4147aa7de5a72) Fix hidden method unused arg warning - _RJ Rybarczyk _ +- :wrench: [`1c22623df48f`](https://github.com/casey/intermodal/commit/1c22623df48f039b2e3fd984371688e3226e6f1e) Trigger GitHub actions build on either push and PR to master - _Casey Rodarmor _ +- :art: [`f2a5f137294e`](https://github.com/casey/intermodal/commit/f2a5f137294ef4ffc49efd4feb164d6349dbd2f7) Format with unstable rustfmt options - _Casey Rodarmor _ +- :zap: [`d71bdffda15b`](https://github.com/casey/intermodal/commit/d71bdffda15b2de30313e692661420698c026a36) Refactor tests and improve verification - _Casey Rodarmor _ +- :white_check_mark: [`2fb5bdb93344`](https://github.com/casey/intermodal/commit/2fb5bdb93344ba554ef1ecefb5706f380cc2bcee) Test that metainfo bencode representation is correct - _Casey Rodarmor _ +- :books: [`fdb18bb8d807`](https://github.com/casey/intermodal/commit/fdb18bb8d8077c2b8c88bcd5a4e5a9118bd001a1) Update discord invite link - _Casey Rodarmor _ +- :books: [`55f2fcc73874`](https://github.com/casey/intermodal/commit/55f2fcc738741f914ea799026b63831b28f2a57b) Add discord badge to readme - _Casey Rodarmor _ +- :books: [`355f76b86d3a`](https://github.com/casey/intermodal/commit/355f76b86d3ad69cad7b09b2a92c1419922148ec) Update badges - _Casey Rodarmor _ +- :books: [`b0962722c7db`](https://github.com/casey/intermodal/commit/b0962722c7dbcccc0779a2743486c0b1a9d1619c) Add Github Actions build badge to readme - _Casey Rodarmor _ +- :art: [`1227628306f0`](https://github.com/casey/intermodal/commit/1227628306f046ef7154ad3a514b1746b41e59d9) Use list of SHA1 digests for piece list - _Casey Rodarmor _ +- :bug: [`9787344d9eee`](https://github.com/casey/intermodal/commit/9787344d9eeed0251e963be2d8e9d2777d023b55) Fix torrent verify about message - _Casey Rodarmor _ +- :sparkles: [`165a7ea444b0`](https://github.com/casey/intermodal/commit/165a7ea444b00376c17ac7275381311b5bf7dd23) Support adding DHT bootstrap nodes to created torrents - _Casey Rodarmor _ +- :sparkles: [`6549850dac2e`](https://github.com/casey/intermodal/commit/6549850dac2eb57f7ea2e67a1a4b50bd4a35b1d4) Add initial implementation of `imdl torrent verify` - _Casey Rodarmor _ +- :art: [`b0f449b6aedb`](https://github.com/casey/intermodal/commit/b0f449b6aedb78f185f8c7ecb451391b40de11e3) Drop `serde_bencode` in favor of `bendy` - _Casey Rodarmor _ +- :zap: [`9b696f78a7df`](https://github.com/casey/intermodal/commit/9b696f78a7dfb19fde1d6eb5d2805af450e0d335) Don't display tier labels if tiers only contain a single entry - _Casey Rodarmor _ +- :zap: [`f7e9e80f972d`](https://github.com/casey/intermodal/commit/f7e9e80f972deae401ab40e7afdf6ddd107b4d4c) Show files in single-file mode - _Casey Rodarmor _ +- :sparkles: [`43d87c06b6b5`](https://github.com/casey/intermodal/commit/43d87c06b6b5a3b1c6b21f088a56da1892279700) Display torrent file tree - _Casey Rodarmor _ +- :sparkles: [`a574368ffca6`](https://github.com/casey/intermodal/commit/a574368ffca6738393950bfe2412a26d66a41d17) Allow including and excluding files from torrent with globs - _Casey Rodarmor _ +- :zap: [`9158c230dfd0`](https://github.com/casey/intermodal/commit/9158c230dfd0a7ec90847b05399137012501a613) Skip hidden files, symlinks, and junk in created torrents - _Casey Rodarmor _ +- :sparkles: [`3739a92857fc`](https://github.com/casey/intermodal/commit/3739a92857fcc402c5063361ff1637fd7fb0b87e) Support creating multi-file torrents - _Casey Rodarmor _ +- :zap: [`551617de4f09`](https://github.com/casey/intermodal/commit/551617de4f09370e34a279884a1b38f5fb7f702c) Don't overwrite destination torrent without `--force` - _Casey Rodarmor _ +- :sparkles: [`df3326510c4b`](https://github.com/casey/intermodal/commit/df3326510c4bd924a7c4cba5520ba156a533924e) Write torrent to stdout if `-` is passed to `--output` - _Casey Rodarmor _ +- :sparkles: [`5a1de1acd219`](https://github.com/casey/intermodal/commit/5a1de1acd219bc5e83c678fccaf862aee40713be) Select piece length when none is provided - _Casey Rodarmor _ +- :zap: [`35a0e8f9b73f`](https://github.com/casey/intermodal/commit/35a0e8f9b73f2271a372e46b5cc72db952e02ae0) Improve torrent display formatting - _Casey Rodarmor _ +- :sparkles: [`5c5dac1fe532`](https://github.com/casey/intermodal/commit/5c5dac1fe53247ea5893953e503aa074d19e9a38) Add source to generated torrent with `--source` - _Casey Rodarmor _ +- :zap: [`b9ca02fbaabc`](https://github.com/casey/intermodal/commit/b9ca02fbaabcfb601fc91ee8762ddea2f41dff9e) Show information about torrents after creation - _Casey Rodarmor _ +- :white_check_mark: [`3971854eaa44`](https://github.com/casey/intermodal/commit/3971854eaa44eda7ebc20dbfe8e6c6659b9bad98) Check for outdated dependencies before publishing - _Casey Rodarmor _ +- :sparkles: [`99a069a02184`](https://github.com/casey/intermodal/commit/99a069a02184c451eb81a632bae1cbda2f6195ea) Add `imdl torrent show` - _Casey Rodarmor _ +- :zap: [`6df45e024463`](https://github.com/casey/intermodal/commit/6df45e024463e0d10cd391e8758f797692a6f762) Restrict piece length - _Casey Rodarmor _ +- :books: [`85f02d9f2992`](https://github.com/casey/intermodal/commit/85f02d9f2992f64208d35f4d2776c27e33861b89) Add pyrocore to prior art section of readme - _Casey Rodarmor _ +- :zap: [`635692fdfac1`](https://github.com/casey/intermodal/commit/635692fdfac195f0eb0f8184d97280788e5cd8ee) Accept `--piece-length` arguments with SI units - _Casey Rodarmor _ +- :books: [`eb6556ae6aa2`](https://github.com/casey/intermodal/commit/eb6556ae6aa2106faf0f87043e4dcbcdc3fba35e) Replace favicon with pixel art rainbow text version - _Casey Rodarmor _ +- :books: [`5611f359686d`](https://github.com/casey/intermodal/commit/5611f359686d67f738b355dd3612b1febe751ed9) Add favicon to github pages - _Casey Rodarmor _ +- :books: [`3f91f042c771`](https://github.com/casey/intermodal/commit/3f91f042c7717cef93350782617286df18c4f335) Fix github pages table jitter - _Casey Rodarmor _ +- :books: [`9ff627c29fd9`](https://github.com/casey/intermodal/commit/9ff627c29fd9b761be997370fa950da92417b76c) Make homepage A E S T H E T I C - _Casey Rodarmor _ +- :wrench: [`460cf9ee0e79`](https://github.com/casey/intermodal/commit/460cf9ee0e79f2551eacdbb1299c2fd366a49a4c) Disable bors - _Casey Rodarmor _ +- :wrench: [`2512b05ece5e`](https://github.com/casey/intermodal/commit/2512b05ece5ee679691dde9172a7d69213ed8576) Fix Bors - _Casey Rodarmor _ +- :books: [`e2c1f291605c`](https://github.com/casey/intermodal/commit/e2c1f291605cb54685d86ce9eb3afb4d383fc9fe) Center symbols in BEP support table key in readme - _Casey Rodarmor _ +- :books: [`48ca86c67ce7`](https://github.com/casey/intermodal/commit/48ca86c67ce75204f13a48d3373f35e09fea7a5e) Add Alternatives & Prior Art section to readme - _Casey Rodarmor _ +- :package: [`ef5be39f9b61`](https://github.com/casey/intermodal/commit/ef5be39f9b61033468cbe64b5340be45e56b5fc7) Update install instructions to new domain - _Casey Rodarmor _ +- :white_check_mark: [`6461a00ba37a`](https://github.com/casey/intermodal/commit/6461a00ba37ab29770637e172303be83a282ecaa) Test that `wss://` trackers are accepted - _Casey Rodarmor _ +- :wrench: [`a6745e2a4187`](https://github.com/casey/intermodal/commit/a6745e2a4187e151354ae1e0dced6210abb2cba5) Configure Bors - _Casey Rodarmor _ +- :books: [`dc95bc53b27b`](https://github.com/casey/intermodal/commit/dc95bc53b27b2e0f3f6f2f29c66d59cd05590d44) Add github pages homepage - _Casey Rodarmor _ +- :package: [`e2cf93efb054`](https://github.com/casey/intermodal/commit/e2cf93efb054629f14d2a837494b2790fc5a36a1) Add `install` script and installation section to readme - _Casey Rodarmor _ -### Misc -- Make `just done` default to current branch (#259) -- Indicate BEP 9 support in readme (#254) -- Update BEP list in readme with new issue links (#246) -- Use imdl-indicatif (#240) -- Test `imdl torrent verify` output (#239) -- Deny `clippy::too_many_arguments` (#237) -- Add explanation paragraph to readme (#232) -- Use bendy dep from crates.io instead of GitHub (#231) -- Add braille spinner char explanation and legend (#229) -- Use `concat!(...)` to format braille tick chars (#226) -- Remove `matches` macro (#224) -- Rename `Target` to `OutputTarget` (#217) -- Add empty book (#212) -- Test piece-hashing edge cases (#204) -- Test creating torrents from `.` and `..` (#203) -- Revise command line value names (#202) -- Refactor Opt into Arguments, Options, and Subcommand (#200) -- Fix hidden method unused arg warning (#198) -- Trigger GitHub actions build on either push and PR to master (#199) -- Format with unstable rustfmt options (#191) -- Refactor tests and improve verification (#189) -- Test that metainfo bencode representation is correct (#184) -- Update discord invite link (#181) -- Add discord badge to readme (#180) -- Update badges (#179) -- Add Github Actions build badge to readme (#178) -- Use list of SHA1 digests for piece list (#173) -- Drop `serde_bencode` in favor of `bendy` (#160) -- Check for outdated dependencies before publishing (#139) -- Add pyrocore to prior art section of readme (#135) -- Replace favicon with pixel art rainbow text version (#133) -- Add favicon to github pages (#132) -- Fix github pages table jitter (#131) -- Make homepage A E S T H E T I C (#130) -- Disable bors (#129) -- Fix Bors (#128) -- Center symbols in BEP support table key in readme (#127) -- Add Alternatives & Prior Art section to readme (#126) -- Test that `wss://` trackers are accepted (#121) -- Configure Bors (#117) -- Add github pages homepage (#118) -- Add `install` script and installation section to readme (#116) -[v0.0.1] - 2020-1-31 --------------------- - -### Added -- Open torrents with `imdl create --open ...` (#112) -- [torrent stats] Pretty print torrents if `--print` is passed (#84) -- Add colored output (#66) -- Initial commit - -### Misc -- Add table of references to readme (#111) -- Test UDP tracker URLs parse (#110) -- Remove redundant information from the readme (#104) -- Link to tracking issues from BEP support table (#102) -- Add package script (#89) -- Build and upload release artifacts from CI (#88) -- Add `help` messages to CLI flags and options (#87) -- Enable `--help` text wrapping (#76) -- Sort `Create` opt struct fields (#75) -- BEP 3 is supported (#74) -- Slighly improve readability of Hasher::hash_root (#73) -- Add table of contents to readme (#72) -- Add BEP support table to readme (#67) -- Redirect stdin and stdout and capture for tests (#64) -- Rename: Environment -> Env (#63) -- Rename bencode::Error::ExtraData -> TrailingData (#60) -- Fail CI if code isn't formatted (#55) -- Delete extraneous comment in workflow file (#54) -- Run CI tests on windows, macos, and linux (#53) -- Configure clippy and lint on push (#52) -- Add `done` recipe to justfile (#51) -- Add build and test github action workflow (#50) +[v0.0.1](https://github.com/casey/intermodal/releases/tag/v0.0.1) - 2020-04-08 +------------------------------------------------------------------------------ +- :bookmark: [`9dd8a5629814`](https://github.com/casey/intermodal/commit/9dd8a56298143f80e6ecc85311bdbdba0b914ef5) Release v0.0.1 - _Casey Rodarmor _ +- :sparkles: [`e8ab0e1c4f68`](https://github.com/casey/intermodal/commit/e8ab0e1c4f687d2f98a90add9d954efb44282058) Open torrents with `imdl create --open ...` - _Casey Rodarmor _ +- :books: [`495316e82110`](https://github.com/casey/intermodal/commit/495316e8211038b55ec0a12daaa6d70a31d7eaee) Add table of references to readme - _Casey Rodarmor _ +- :white_check_mark: [`a8446c82db9e`](https://github.com/casey/intermodal/commit/a8446c82db9e54a96d967f4028b68fc8fce39653) Test UDP tracker URLs parse - _Casey Rodarmor _ +- :books: [`0560181a099f`](https://github.com/casey/intermodal/commit/0560181a099f5f1e47c030256c0715df5f036e14) Remove redundant information from the readme - _Casey Rodarmor _ +- :books: [`1a20f0d0b35d`](https://github.com/casey/intermodal/commit/1a20f0d0b35dd8aa05f783d0660e87a014000dc8) Link to tracking issues from BEP support table - _Casey Rodarmor _ +- :package: [`ff3a30ae2138`](https://github.com/casey/intermodal/commit/ff3a30ae21388988076e4c892565b0e679076152) Add package script - _Casey Rodarmor _ +- :package: [`cf59a58c6733`](https://github.com/casey/intermodal/commit/cf59a58c67331fef371011d562abb9f1f1bf6437) Build and upload release artifacts from CI - _Casey Rodarmor _ +- :books: [`70e0091ec03c`](https://github.com/casey/intermodal/commit/70e0091ec03ca0014974ebf98673f3e37a1fea75) Add `help` messages to CLI flags and options - _Casey Rodarmor _ +- :sparkles: [`b83d8d7ef53b`](https://github.com/casey/intermodal/commit/b83d8d7ef53bac73e7066cfd3f9497a62fc9233b) [torrent stats] Pretty print torrents if `--print` is passed - _Casey Rodarmor _ +- :zap: [`7d5e68f1941a`](https://github.com/casey/intermodal/commit/7d5e68f1941a63f3ce24218d43d03cafa6e65a44) Enable `--help` text wrapping - _Casey Rodarmor _ +- :art: [`87e9b982b6be`](https://github.com/casey/intermodal/commit/87e9b982b6be4cfc4b362863e4110770f88bf4b5) Sort `Create` opt struct fields - _Casey Rodarmor _ +- :books: [`801a51926564`](https://github.com/casey/intermodal/commit/801a51926564918ab0b4d08a185dc799859e73e2) BEP 3 is supported - _Casey Rodarmor _ +- :art: [`1749fce2b227`](https://github.com/casey/intermodal/commit/1749fce2b227efc446ca478891ea5f63b62f5c2d) Slighly improve readability of Hasher::hash_root - _Casey Rodarmor _ +- :books: [`1f5b829742f4`](https://github.com/casey/intermodal/commit/1f5b829742f4b0a355587ecc8f33d2a8bfe13118) Add table of contents to readme - _Casey Rodarmor _ +- :books: [`66d44155f05a`](https://github.com/casey/intermodal/commit/66d44155f05aab5d9af315831df2f3a68e257d51) Add BEP support table to readme - _Casey Rodarmor _ +- :sparkles: [`d1f8f24d8e18`](https://github.com/casey/intermodal/commit/d1f8f24d8e184bb79e3e8bd17c024a70d545d2a2) Add colored output - _Casey Rodarmor _ +- :white_check_mark: [`b334fa49b2d8`](https://github.com/casey/intermodal/commit/b334fa49b2d84905197533354afb302a61f3499b) Redirect stdin and stdout and capture for tests - _Casey Rodarmor _ +- :art: [`fd06943726cb`](https://github.com/casey/intermodal/commit/fd06943726cbc864b32401213d6958c7164b7851) Rename: Environment -> Env - _Casey Rodarmor _ +- :art: [`7420c91553c6`](https://github.com/casey/intermodal/commit/7420c91553c622849fd2de4aaa1d4c1a6e7def3b) Rename bencode::Error::ExtraData -> TrailingData - _Casey Rodarmor _ +- :white_check_mark: [`7de1c0477623`](https://github.com/casey/intermodal/commit/7de1c047762318722c09b9099890996894b82b92) Fail CI if code isn't formatted - _Casey Rodarmor _ +- :art: [`408735621e51`](https://github.com/casey/intermodal/commit/408735621e51a5b3a67652cc602f1f429bfe7ca1) Delete extraneous comment in workflow file - _Casey Rodarmor _ +- :white_check_mark: [`074a3b3d42dd`](https://github.com/casey/intermodal/commit/074a3b3d42dd6b4037cd31383751e3f2e048366d) Run CI tests on windows, macos, and linux - _Casey Rodarmor _ +- :white_check_mark: [`9f8366137477`](https://github.com/casey/intermodal/commit/9f83661374776715108fe3876153bdd0a001894b) Configure clippy and lint on push - _Casey Rodarmor _ +- :wrench: [`7f630a1bd937`](https://github.com/casey/intermodal/commit/7f630a1bd9376e2461b55ac66126147277ab5dfe) Add `done` recipe to justfile - _Casey Rodarmor _ +- :white_check_mark: [`3affa8c5e14b`](https://github.com/casey/intermodal/commit/3affa8c5e14b40a7be88705e5ab7d7fc492a3a69) Add build and test github action workflow - _Casey Rodarmor _ +- :sparkles: [`98335f435de2`](https://github.com/casey/intermodal/commit/98335f435de2bc0cc80abafdea9536dc945fb11c) Initial commit - _Casey Rodarmor _ diff --git a/Cargo.lock b/Cargo.lock index 6f441eb..0e8868d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,6 +27,12 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "anyhow" +version = "1.0.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9a60d744a80c30fcb657dfe2c1b22bcb3e814c1a1e3674f32bf5820b570fbff" + [[package]] name = "array-init" version = "0.0.4" @@ -101,11 +107,25 @@ dependencies = [ "memchr", ] +[[package]] +name = "cargo_toml" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7877b00aaf997d7ed66a81281d3a8b9f9da5361df05b72785b985349979a0f3" +dependencies = [ + "serde", + "serde_derive", + "toml", +] + [[package]] name = "cc" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -113,6 +133,23 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "changelog" +version = "0.0.0" +dependencies = [ + "anyhow", + "cargo_toml", + "chrono", + "fehler", + "git2", + "serde", + "serde_yaml", + "structopt", + "strum", + "strum_macros", + "url", +] + [[package]] name = "chrono" version = "0.4.11" @@ -203,6 +240,12 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +[[package]] +name = "dtoa" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" + [[package]] name = "encode_unicode" version = "0.3.6" @@ -244,6 +287,26 @@ dependencies = [ "synstructure", ] +[[package]] +name = "fehler" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5729fe49ba028cd550747b6e62cd3d841beccab5390aa398538c31a2d983635" +dependencies = [ + "fehler-macros", +] + +[[package]] +name = "fehler-macros" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccb5acb1045ebbfa222e2c50679e392a71dd77030b78fb0189f2d9c5974400f9" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "fnv" version = "1.0.6" @@ -261,6 +324,21 @@ dependencies = [ "wasi", ] +[[package]] +name = "git2" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef222034f2069cfc5af01ce423574d3d9a3925bd4052912a14e5bcfd7ca9e47a" +dependencies = [ + "bitflags", + "libc", + "libgit2-sys", + "log", + "openssl-probe", + "openssl-sys", + "url", +] + [[package]] name = "glob" version = "0.3.0" @@ -368,6 +446,15 @@ dependencies = [ "regex", ] +[[package]] +name = "jobserver" +version = "0.1.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2" +dependencies = [ + "libc", +] + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -390,6 +477,52 @@ version = "0.2.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dea0c0405123bba743ee3f91f49b1c7cfb684eef0da0a50110f758ccf24cdff0" +[[package]] +name = "libgit2-sys" +version = "0.12.2+1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12c878ccc1a49ff71e264233a66d2114cdcc7fdc44c0ebe2b54075240831238" +dependencies = [ + "cc", + "libc", + "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +] + +[[package]] +name = "libssh2-sys" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb70f29dc7c31d32c97577f13f41221af981b31248083e347b7f2c39225a6bc" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "libz-sys" +version = "1.0.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "linked-hash-map" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae91b68aebc4ddb91978b11a1b02ddd8602a05ec19002801c5666000e05e0f83" + [[package]] name = "log" version = "0.4.8" @@ -463,6 +596,25 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "openssl-probe" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" + +[[package]] +name = "openssl-sys" +version = "0.9.54" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", +] + [[package]] name = "output_vt100" version = "0.1.2" @@ -478,6 +630,12 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pkg-config" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" + [[package]] name = "ppv-lite86" version = "0.2.6" @@ -647,9 +805,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e707fbbf255b8fc8c3b99abb91e7257a622caeb20a9818cbadbeeede4e0932ff" +checksum = "36df6ac6412072f67cf767ebbde4133a5b2e88e76dc6187fa7104cd16f783399" dependencies = [ "serde_derive", ] @@ -676,9 +834,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac5d00fc561ba2724df6758a17de23df5914f20e41cb00f94d5b7ae42fffaff8" +checksum = "9e549e3abf4fb8621bd1609f11dfc9f5e50320802273b12f3811a67e6716ea6c" dependencies = [ "proc-macro2", "quote", @@ -706,6 +864,18 @@ dependencies = [ "syn", ] +[[package]] +name = "serde_yaml" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35" +dependencies = [ + "dtoa", + "linked-hash-map", + "serde", + "yaml-rust", +] + [[package]] name = "sha1" version = "0.6.0" @@ -918,6 +1088,15 @@ dependencies = [ "winapi 0.3.8", ] +[[package]] +name = "toml" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +dependencies = [ + "serde", +] + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -972,8 +1151,15 @@ dependencies = [ "idna", "matches", "percent-encoding", + "serde", ] +[[package]] +name = "vcpkg" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" + [[package]] name = "vec_map" version = "0.8.1" @@ -1045,3 +1231,12 @@ name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "yaml-rust" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65923dd1784f44da1d2c3dbbc5e822045628c590ba72123e1c73d3c230c4434d" +dependencies = [ + "linked-hash-map", +] diff --git a/Cargo.toml b/Cargo.toml index 80c97c8..4eb45db 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ strum_macros = "0.18.0" syn = "1.0.14" tempfile = "3.0.0" unicode-width = "0.1.0" -url = "2.0.0" +url = "2.1.1" walkdir = "2.1.0" [dependencies.bendy] @@ -64,6 +64,10 @@ temptree = "0.0.0" members = [ # run commands for demo animation "bin/demo", + # generate table of contents and table of supported BEPs in README.md "bin/update-readme", + + # generate the changelog from git commits + "bin/changelog", ] diff --git a/bin/changelog/Cargo.toml b/bin/changelog/Cargo.toml new file mode 100644 index 0000000..48ea233 --- /dev/null +++ b/bin/changelog/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "changelog" +version = "0.0.0" +authors = ["Casey Rodarmor "] +edition = "2018" +publish = false + +[dependencies] +anyhow = "1.0.28" +cargo_toml = "0.8.0" +chrono = "0.4.11" +fehler = "1.0.0" +git2 = "0.13.1" +serde_yaml = "0.8.11" +structopt = "0.3.12" +strum = "0.18.0" +strum_macros = "0.18.0" + +[dependencies.serde] +version = "1.0.106" +features = ["derive"] + +[dependencies.url] +version = "2.1.1" +features = ["serde"] diff --git a/bin/changelog/src/changelog.rs b/bin/changelog/src/changelog.rs new file mode 100644 index 0000000..5cf842d --- /dev/null +++ b/bin/changelog/src/changelog.rs @@ -0,0 +1,100 @@ +use crate::common::*; + +pub(crate) struct Changelog { + releases: Vec, +} + +impl Changelog { + #[throws] + pub(crate) fn new(repo: &Repository) -> Self { + let mut current = repo.head()?.peel_to_commit()?; + + let mut entries = Vec::new(); + + let mut head = true; + + loop { + let manifest_bytes = current + .tree()? + .get_path("Cargo.toml".as_ref())? + .to_object(&repo)? + .as_blob() + .unwrap() + .content() + .to_vec(); + + let manifest = Manifest::from_slice(&manifest_bytes)?; + + let entry = Entry::new(¤t, manifest.package.unwrap().version.as_ref(), head)?; + + head = false; + + entries.push(entry); + + match current.parent_count() { + 0 => break, + 1 => current = current.parent(0)?, + count => panic!("Commit has {} parents", count), + } + } + + entries.reverse(); + + let mut releases = Vec::new(); + + let mut last_version = entries[0].version.clone(); + + let mut unreleased = Vec::new(); + + for entry in entries { + if entry.version != last_version { + let version = entry.version.clone(); + let time = entry.time; + + unreleased.push(entry); + + releases.push(Release { + version: Some(version.clone()), + time, + entries: unreleased, + }); + + last_version = version; + + unreleased = Vec::new(); + } else { + unreleased.push(entry); + } + } + + if !unreleased.is_empty() { + releases.push(Release { + version: None, + time: Utc::now(), + entries: unreleased, + }); + } + + releases.reverse(); + + for release in &mut releases { + release.entries.reverse(); + } + + Self { releases } + } +} + +impl Display for Changelog { + #[throws(fmt::Error)] + fn fmt(&self, f: &mut Formatter) { + writeln!(f, "Changelog")?; + writeln!(f, "=========")?; + + for release in &self.releases { + writeln!(f)?; + writeln!(f)?; + write!(f, "{}", release)?; + } + } +} diff --git a/bin/changelog/src/common.rs b/bin/changelog/src/common.rs new file mode 100644 index 0000000..7aa93a1 --- /dev/null +++ b/bin/changelog/src/common.rs @@ -0,0 +1,20 @@ +pub(crate) use std::{ + cmp::{Ord, PartialOrd}, + env, + fmt::{self, Display, Formatter}, + fs, str, +}; + +pub(crate) use anyhow::Error; +pub(crate) use cargo_toml::Manifest; +pub(crate) use chrono::{DateTime, NaiveDateTime, Utc}; +pub(crate) use fehler::throws; +pub(crate) use git2::{Commit, Repository}; +pub(crate) use serde::{Deserialize, Serialize}; +pub(crate) use structopt::StructOpt; +pub(crate) use strum_macros::IntoStaticStr; +pub(crate) use url::Url; + +pub(crate) use crate::{ + changelog::Changelog, entry::Entry, kind::Kind, metadata::Metadata, opt::Opt, release::Release, +}; diff --git a/bin/changelog/src/entry.rs b/bin/changelog/src/entry.rs new file mode 100644 index 0000000..8725159 --- /dev/null +++ b/bin/changelog/src/entry.rs @@ -0,0 +1,86 @@ +use crate::common::*; + +pub(crate) struct Entry { + pub(crate) time: DateTime, + pub(crate) version: String, + pub(crate) metadata: Metadata, + hash: String, + author: String, + summary: String, + head: bool, +} + +impl Entry { + #[throws] + pub(crate) fn new(commit: &Commit, version: &str, head: bool) -> Self { + let time = DateTime::::from_utc( + NaiveDateTime::from_timestamp(commit.time().seconds(), 0), + Utc, + ); + + let metadata = Metadata::from_commit(commit).unwrap_or_default(); + + Entry { + version: version.into(), + summary: commit.summary().unwrap().into(), + author: commit.author().to_string(), + hash: commit.id().to_string(), + metadata, + head, + time, + } + } + + fn url(&self) -> String { + if self.head { + "https://github.com/casey/intermodal/commits/master".into() + } else { + format!("https://github.com/casey/intermodal/commit/{}", self.hash) + } + } + + fn permanent_shorthash(&self) -> String { + if self.head { + "x".repeat(12) + } else { + self.hash[..12].into() + } + } +} + +impl Display for Entry { + #[throws(fmt::Error)] + fn fmt(&self, f: &mut Formatter) { + let url = self.url(); + + let shorthash = self.permanent_shorthash(); + + write!( + f, + "{} [`{}`]({}) {}", + self.metadata.emoji(), + shorthash, + url, + self.summary + )?; + + if let Some(pr) = &self.metadata.pr { + let n = pr.path_segments().unwrap().last().unwrap(); + write!(f, " ([#{}]({}))", n, pr)?; + } + + if !self.metadata.fixes.is_empty() { + write!(f, " - Fixes ")?; + + for (i, issue) in self.metadata.fixes.iter().enumerate() { + if i > 0 { + write!(f, ", ")?; + } + let n = issue.path_segments().unwrap().last().unwrap(); + write!(f, "[#{}]({})", n, issue)?; + } + } + + write!(f, " - _{}_", self.author)?; + } +} diff --git a/bin/changelog/src/kind.rs b/bin/changelog/src/kind.rs new file mode 100644 index 0000000..579b15c --- /dev/null +++ b/bin/changelog/src/kind.rs @@ -0,0 +1,18 @@ +use crate::common::*; + +#[derive( + Deserialize, Serialize, Debug, Clone, Copy, Eq, PartialEq, Ord, PartialOrd, IntoStaticStr, +)] +#[serde(rename_all = "kebab-case")] +pub(crate) enum Kind { + Added, + Breaking, + Changed, + Development, + Distribution, + Documentation, + Fixed, + Reform, + Release, + Testing, +} diff --git a/bin/changelog/src/main.rs b/bin/changelog/src/main.rs new file mode 100644 index 0000000..c4561a5 --- /dev/null +++ b/bin/changelog/src/main.rs @@ -0,0 +1,18 @@ +// TODO: +// - parse URL in fixed: +// - figure out how to check labels before merge + +use crate::common::*; + +mod changelog; +mod common; +mod entry; +mod kind; +mod metadata; +mod opt; +mod release; + +#[throws] +fn main() { + Opt::from_args().run()?; +} diff --git a/bin/changelog/src/metadata.rs b/bin/changelog/src/metadata.rs new file mode 100644 index 0000000..c2df7fe --- /dev/null +++ b/bin/changelog/src/metadata.rs @@ -0,0 +1,74 @@ +use crate::common::*; + +#[derive(Deserialize, Serialize)] +pub(crate) struct Metadata { + #[serde(default, rename = "type")] + pub(crate) kind: Option, + #[serde(default)] + pub(crate) pr: Option, + #[serde(default)] + pub(crate) fixes: Vec, +} + +impl Metadata { + #[throws(as Option)] + pub(crate) fn from_commit(commit: &Commit) -> Metadata { + const BLANK: &str = "\n\n"; + + let message = String::from_utf8_lossy(commit.message_bytes()); + + let blank = message.rfind(BLANK)?; + + let yaml = &message[blank + BLANK.len()..]; + + let metadata = serde_yaml::from_str(yaml).ok()?; + + metadata + } + + pub(crate) fn emoji(&self) -> &'static str { + if let Some(kind) = self.kind { + match kind { + Kind::Added => ":sparkles:", + Kind::Breaking => ":boom:", + Kind::Changed => ":zap:", + Kind::Development => ":wrench:", + Kind::Distribution => ":package:", + Kind::Documentation => ":books:", + Kind::Fixed => ":bug:", + Kind::Reform => ":art:", + Kind::Release => ":bookmark:", + Kind::Testing => ":white_check_mark:", + } + } else { + ":construction:" + } + } +} + +impl Default for Metadata { + fn default() -> Metadata { + Metadata { + kind: None, + pr: None, + fixes: Vec::new(), + } + } +} + +impl Display for Metadata { + #[throws(fmt::Error)] + fn fmt(&self, f: &mut Formatter) { + writeln!(f)?; + writeln!( + f, + "{}", + serde_yaml::to_string(&self) + .unwrap() + .split("---") + .last() + .unwrap() + .trim() + )?; + } +} diff --git a/bin/changelog/src/opt.rs b/bin/changelog/src/opt.rs new file mode 100644 index 0000000..82949ce --- /dev/null +++ b/bin/changelog/src/opt.rs @@ -0,0 +1,29 @@ +use crate::common::*; + +#[derive(StructOpt)] +pub(crate) enum Opt { + IssueTemplate, + Update, +} + +impl Opt { + #[throws] + pub(crate) fn run(self) { + match self { + Self::IssueTemplate => { + println!("{}", Metadata::default().to_string()); + } + Self::Update => { + let cwd = env::current_dir()?; + + let repo = Repository::discover(cwd)?; + + let changelog = Changelog::new(&repo)?; + + let dst = repo.workdir().unwrap().join("CHANGELOG.md"); + + fs::write(dst, changelog.to_string())?; + } + } + } +} diff --git a/bin/changelog/src/release.rs b/bin/changelog/src/release.rs new file mode 100644 index 0000000..17192b2 --- /dev/null +++ b/bin/changelog/src/release.rs @@ -0,0 +1,29 @@ +use crate::common::*; + +pub(crate) struct Release { + pub(crate) version: Option, + pub(crate) time: DateTime, + pub(crate) entries: Vec, +} + +impl Display for Release { + #[throws(fmt::Error)] + fn fmt(&self, f: &mut Formatter) { + let time = self.time.format("%Y-%m-%d"); + + let header = match &self.version { + Some(version) => format!( + "[v{}](https://github.com/casey/intermodal/releases/tag/v{}) - {}", + version, version, time, + ), + None => format!("UNRELEASED - {}", time), + }; + + writeln!(f, "{}", header)?; + writeln!(f, "{}", "-".repeat(header.len()))?; + + for entry in &self.entries { + writeln!(f, "- {}", entry)?; + } + } +}