main
tag: v0.10.0
tag: v0.8.0
tag: v0.9.0
tag: v1.0.0
tag: v2.1.0
tag: v2.1.1
tag: v2.10.0
tag: v2.11.0
tag: v2.2.0
tag: v2.3.0
tag: v2.4.0
tag: v2.4.1
tag: v2.5.0
tag: v2.5.1
tag: v2.5.2
tag: v2.6.0
tag: v2.7.0
tag: v2.8.0
tag: v2.9.0
tag: v3.0.0
tag: v3.1.0
tag: v3.2.0
tag: v3.2.1
Files
Commits
Tags
Notes
Issues
Declare the Bento release config in-repo
kind = "library" plus a publish.rhai, so releasing this crate goes
through Bento's preflight rather than a hand-run cargo publish. The
preflight is what would have caught pter 0.1.0's dead repository URL.
2 files changed,
+37 insertions,
-0 deletions
1
+
# How Bento releases makeover. Lives here rather than in the daemon's config so it is
2
+
# versioned with the code it describes.
3
+
4
+
# A crate, not an app: one publish.rhai rather than a recipe per platform, and
5
+
# the target below names the host that uploads rather than a build matrix.
6
+
kind = "library"
7
+
8
+
targets = ["linux/x86_64"]
1
+
// Publish this crate to crates.io.
2
+
//
3
+
// A library has no per-platform artifact, so this is the whole release: one
4
+
// recipe, run on whichever host the manifest names.
5
+
//
6
+
// The preflight step is the point of routing this through Bento. crates.io
7
+
// versions can be yanked but never edited, so a wrong repository URL, a
8
+
// missing license, or a duplicate version is permanent the moment it uploads.
9
+
// pter 0.1.0 went out with a dead repository link and could only be corrected
10
+
// by releasing again.
11
+
12
+
let h = build_host();
13
+
let r = repo();
14
+
let v = version();
15
+
16
+
step("checkout");
17
+
sh_ok(h, "cd " + r + " && git pull --ff-only");
18
+
19
+
step("build");
20
+
sh_ok(h, "cd " + r + " && cargo test " + feature_flags());
21
+
22
+
step("verify");
23
+
// Aborts the run with the specific problems if anything is wrong.
24
+
log(crate_preflight());
25
+
sh_ok(h, "cd " + r + " && cargo publish --dry-run " + feature_flags());
26
+
27
+
step("publish");
28
+
sh_ok(h, "cd " + r + " && cargo publish " + feature_flags());
29
+
log("published " + v + " to crates.io");