We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fef70f2 commit 8f30b27Copy full SHA for 8f30b27
repo/mdbook.ubpkg.sky
@@ -0,0 +1,22 @@
1
+gh = github_repo("rust-lang/mdBook")
2
+
3
+release = gh.latest_release()
4
5
+rest = {
6
+ ("macos", "aarch64"): "aarch64-apple-darwin",
7
+ ("macos", "x86_64"): "x86_64-apple-darwin",
8
+ ("linux", "x86_64"): "x86_64-unknown-linux-musl",
9
+ ("linux", "aarch64"): "aarch64-unknown-linux-musl",
10
+ ("windows", "x86_64"): "x86_64-pc-windows-msvc",
11
+}[(os, arch)]
12
13
+archive_format = {
14
+ "linux": "tar.gz",
15
+ "macos": "tar.gz",
16
+ "windows": "zip",
17
+}[os]
18
19
20
+asset = release.get_asset_url("mdbook-{version}-{rest}.{archive_format}".format(version=release.name(), rest=rest, archive_format=archive_format))
21
22
+install_binary(extract_from_url(asset, "mdbook"), "mdbook")
0 commit comments