Skip to content

Commit

Permalink
chore(console): rename console dir to tokio-console (tokio-rs#263)
Browse files Browse the repository at this point in the history
Currently, the `tokio-console` CLI's crate is named `tokio-console`, but
the directory is just named `console`. This causes some problems: for
example, when we publish a release, the release tags are named
`tokio-console-vX.Y.Z`. The GitHub Action for automatically publishing
changelogs to GitHub Releases looks for the changelog in
`<tag-prefix>/CHANGELOG.md`, but this doesn't work, because the tag
prefix is not the name of the directory. So, the automatic release
publishing currently fails for the console crate:
https://github.com/tokio-rs/console/runs/4860467681?check_suite_focus=true

I figured the easiest solution was just to rename the directory to match
the crate name --- this is more consistent anyway.
  • Loading branch information
hawkw authored Jan 20, 2022
1 parent 25b80ce commit e7b228d
Show file tree
Hide file tree
Showing 27 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[workspace]
members = [
"console",
"tokio-console",
"console-subscriber",
"console-api"
]
Expand Down
22 changes: 7 additions & 15 deletions nix/tokio-console.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{ lib
, protobuf
, rustPlatform
, nix-gitignore
}:
{ lib, protobuf, rustPlatform, nix-gitignore }:
let
inherit (nix-gitignore) gitignoreFilterPure withGitignoreFile;
# Workaround for the builtins.filterSource issue mentioned in
Expand All @@ -12,7 +8,8 @@ let
# builtins.filterSource in favor of builtins.path.
gitignoreSource = patterns: path:
builtins.path {
filter = gitignoreFilterPure (_: _: true) (withGitignoreFile patterns path) path;
filter =
gitignoreFilterPure (_: _: true) (withGitignoreFile patterns path) path;
path = path;
name = "src";
};
Expand All @@ -33,21 +30,16 @@ let

src = gitignoreSource extraIgnores ../.;

cargoTOML = lib.importTOML "${src}/console/Cargo.toml";
in
rustPlatform.buildRustPackage rec {
cargoTOML = lib.importTOML "${src}/tokio-console/Cargo.toml";
in rustPlatform.buildRustPackage rec {
pname = cargoTOML.package.name;
version = cargoTOML.package.version;

nativeBuildInputs = [
protobuf
];
nativeBuildInputs = [ protobuf ];

inherit src;

cargoLock = {
lockFile = "${src}/Cargo.lock";
};
cargoLock = { lockFile = "${src}/Cargo.lock"; };

meta = {
inherit (cargoTOML.package) description homepage license;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit e7b228d

Please sign in to comment.