Skip to content

Commit d9dea44

Browse files
authored
Fix release process (#66)
??
1 parent e5f8028 commit d9dea44

File tree

4 files changed

+11
-27
lines changed

4 files changed

+11
-27
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ split-debuginfo = "packed"
2929

3030
# See: https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md
3131
[package.metadata.release]
32-
# After releasing a new version, don't bump the version to a pre-release.
33-
dev-version = false
3432
# Don't tag commits
3533
tag = false
3634
# Don't do `git push`

flake.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nix/packages/get-crate-version.nix

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,16 @@
11
{
2+
lib,
3+
nix-your-shell,
24
writeShellApplication,
3-
cargo,
4-
jq,
55
}:
66
writeShellApplication {
77
name = "get-crate-version";
88

9-
runtimeInputs = [
10-
cargo
11-
jq
12-
];
13-
149
text = ''
15-
# Gets the version of `nix-your-shell` in `Cargo.toml` using
16-
# `cargo metadata` and `jq`.
17-
18-
VERSION=$(cargo metadata --format-version 1 \
19-
| jq -r '.packages[] | select(.name == "nix-your-shell") | .version')
10+
VERSION=${lib.escapeShellArg nix-your-shell.version}
2011
2112
echo "Version in \`Cargo.toml\` is $VERSION" 1>&2
2213
23-
if [[ -z "$VERSION" ]]; then
24-
echo "I wasn't able to determine the version in \`Cargo.toml\` with \`cargo metadata\`"
25-
exit 1
26-
fi
27-
2814
echo "$VERSION"
2915
'';
3016
}

nix/packages/make-release-commit.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
writeShellApplication,
33
cargo,
44
cargo-release,
5-
gitAndTools,
5+
git,
66
}:
77
writeShellApplication {
88
name = "make-release-commit";
99

1010
runtimeInputs = [
1111
cargo
1212
cargo-release
13-
gitAndTools.git
13+
git
1414
];
1515

1616
text = ''

0 commit comments

Comments
 (0)