Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ split-debuginfo = "packed"

# See: https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md
[package.metadata.release]
# After releasing a new version, don't bump the version to a pre-release.
dev-version = false
# Don't tag commits
tag = false
# Don't do `git push`
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 3 additions & 17 deletions nix/packages/get-crate-version.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
{
lib,
nix-your-shell,
writeShellApplication,
cargo,
jq,
}:
writeShellApplication {
name = "get-crate-version";

runtimeInputs = [
cargo
jq
];

text = ''
# Gets the version of `nix-your-shell` in `Cargo.toml` using
# `cargo metadata` and `jq`.

VERSION=$(cargo metadata --format-version 1 \
| jq -r '.packages[] | select(.name == "nix-your-shell") | .version')
VERSION=${lib.escapeShellArg nix-your-shell.version}

echo "Version in \`Cargo.toml\` is $VERSION" 1>&2

if [[ -z "$VERSION" ]]; then
echo "I wasn't able to determine the version in \`Cargo.toml\` with \`cargo metadata\`"
exit 1
fi

echo "$VERSION"
'';
}
4 changes: 2 additions & 2 deletions nix/packages/make-release-commit.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
writeShellApplication,
cargo,
cargo-release,
gitAndTools,
git,
}:
writeShellApplication {
name = "make-release-commit";

runtimeInputs = [
cargo
cargo-release
gitAndTools.git
git
];

text = ''
Expand Down