Skip to content

Commit

Permalink
Fix release process
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Mar 21, 2024
1 parent e5f8028 commit 21bab7b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 27 deletions.
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

0 comments on commit 21bab7b

Please sign in to comment.