From b0f4fcf1d54f7dd34238a259feae00681327e8ac Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 11 Feb 2023 03:27:07 +0900 Subject: [PATCH] codegen: Handle prerelease --- manifests/mdbook.json | 18 +-------- manifests/shfmt.json | 84 --------------------------------------- manifests/wasmtime.json | 14 ------- tools/codegen/src/main.rs | 4 ++ 4 files changed, 5 insertions(+), 115 deletions(-) diff --git a/manifests/mdbook.json b/manifests/mdbook.json index 42fbc656c..a058750b5 100644 --- a/manifests/mdbook.json +++ b/manifests/mdbook.json @@ -439,23 +439,7 @@ } }, "0.1": { - "version": "0.1.10" - }, - "0.1.10": { - "x86_64_linux_gnu": { - "checksum": "b6b2bb3b95ab4ff02c2f1bbaa1b55c2e51805655432e35e4c3cdb30a2c4acdcf" - }, - "x86_64_windows": { - "checksum": "a85dc3a8ad10dacf8d01f427e8935cb4247e45b31b98e2ac2fa5e0f49ff9ce97" - } - }, - "0.1.9": { - "x86_64_linux_gnu": { - "checksum": "cfb1a52d0fa649529b0498600bd9b3d0aa8050bbc7847f8095dc9293b8fa2c4c" - }, - "x86_64_windows": { - "checksum": "bf1a977de7dd5ff6da2985c3051d6e0f8d410fbd32c2095a00896db192c32cd8" - } + "version": "0.1.8" }, "0.1.8": { "x86_64_linux_gnu": { diff --git a/manifests/shfmt.json b/manifests/shfmt.json index 622d7399c..1d68ef910 100644 --- a/manifests/shfmt.json +++ b/manifests/shfmt.json @@ -562,89 +562,5 @@ "x86_64_windows": { "checksum": "ee3361b6acf5c72ca82a917aeceacd06fdcd46c527ad9747408159afd9227a29" } - }, - "0.6": { - "version": "0.6.0" - }, - "0.6.0": { - "x86_64_linux_gnu": { - "checksum": "7128d4740d90757582447c0b844734f90090ef25bc332627d40952dd06a069c2" - }, - "x86_64_macos": { - "checksum": "74144cafbde2cbfd154750010b317e5c2c235c45378436f2d52706dc7b7031c6" - }, - "x86_64_windows": { - "checksum": "9001f87e18da4d8b8bbb26a59a49d6680ce0e2622dc9da85bd952819352bef66" - } - }, - "0.5": { - "version": "0.5.0" - }, - "0.5.0": { - "x86_64_linux_gnu": { - "checksum": "10978caae768eb5d2fff232365d5e20bb0120e0ca158b9b3683f805c904453b6" - }, - "x86_64_macos": { - "checksum": "28dbc9bf5f5e1b5ac335f3f0989cc6fd4eb75e22c8a399cde50b06ce2b499fd7" - }, - "x86_64_windows": { - "checksum": "82fc820eeb35a0d46514fb780e13b6a21b841d7c13b8c8cede8bf20598a11f6f" - } - }, - "0.4": { - "version": "0.4.0" - }, - "0.4.0": { - "x86_64_linux_gnu": { - "checksum": "8b889ee066e52b6f85da7c2f435feec5f2d28c47c5465909ecd9b2075451b50c" - }, - "x86_64_macos": { - "checksum": "e1c949d88e4bd2b56568195ed437d282d9112b02b32b9d6a11871d5a4b85c670" - }, - "x86_64_windows": { - "checksum": "baa162439b5218c4fcf161e8ed366cf1327eff8919b73469410c77f3b20b07ea" - } - }, - "0.3": { - "version": "0.3.0" - }, - "0.3.0": { - "x86_64_linux_gnu": { - "checksum": "9a87d9580f9700c3d8add881a2786b122b83aa31fcf8342f8929c0a93934ba7b" - }, - "x86_64_macos": { - "checksum": "45a05100ce9747281b028fddea59a29a42b9ddda075ec5f57558c1fd5fb732cc" - }, - "x86_64_windows": { - "checksum": "af087f9f7b88290118e8d4595b6f663414f2af131996d4241929ee3c733961af" - } - }, - "0.2": { - "version": "0.2.0" - }, - "0.2.0": { - "x86_64_linux_gnu": { - "checksum": "224569dd672129ed52865783cd010a5f6e389bd006cce9343bf517506491358e" - }, - "x86_64_macos": { - "checksum": "3d7e8f541ae882c2a78594f89124fb101e50e3b974b6d02b091b4ba901644e51" - }, - "x86_64_windows": { - "checksum": "c9fa54aaf72bb08fa44981919e3d1e365a7528e5f393fb8679c4ac2292cfa583" - } - }, - "0.1": { - "version": "0.1.0" - }, - "0.1.0": { - "x86_64_linux_gnu": { - "checksum": "9275582a78ed270142ea9aa37cb28f7f274494c603a5db8d90792a2e06ccfaa0" - }, - "x86_64_macos": { - "checksum": "715d64e1f918b8a17e04ee5ed9e392720f9fa9255a45c9fdbbee50c57ee7bafc" - }, - "x86_64_windows": { - "checksum": "24f38f71a9d39e800a104b63b1b60b6b0bbd313bc01c15c218f8ff6fada90148" - } } } diff --git a/manifests/wasmtime.json b/manifests/wasmtime.json index 2cbb9feb6..d792fb37d 100644 --- a/manifests/wasmtime.json +++ b/manifests/wasmtime.json @@ -893,19 +893,5 @@ "x86_64_windows": { "checksum": "1038ed20f40cdddd50144ee3ad7ab3fc9381f4eb32b48507e154458f14c1e702" } - }, - "0.3": { - "version": "0.3.0" - }, - "0.3.0": { - "x86_64_linux_gnu": { - "checksum": "10055761c5d347d7307e829d4932b9b400318399a5b067d9b2d4ce9327575915" - }, - "x86_64_macos": { - "checksum": "0b29e2132fcd57ba82fe231284861b6d0c3924454c7907474549450958b6664e" - }, - "x86_64_windows": { - "checksum": "ed9f565ba2851a2eac6497bdb91933b426f936ce3b6e525fdacd5c6c1053167f" - } } } diff --git a/tools/codegen/src/main.rs b/tools/codegen/src/main.rs index f6511bd45..c434ad86c 100644 --- a/tools/codegen/src/main.rs +++ b/tools/codegen/src/main.rs @@ -28,6 +28,7 @@ fn main() -> Result<()> { .join("manifests") .join(format!("{package}.json")); let download_cache_dir = &workspace_root.join("tools/codegen/tmp/cache").join(package); + fs::create_dir_all(manifest_path.parent().unwrap())?; fs::create_dir_all(download_cache_dir)?; let base_info: BaseManifest = serde_json::from_slice(&fs::read( @@ -59,6 +60,9 @@ fn main() -> Result<()> { let releases: BTreeMap<_, _> = releases .iter() .filter_map(|release| { + if release.prerelease { + return None; + } let version = release.tag_name.strip_prefix(&base_info.tag_prefix)?; let mut semver_version = version.parse::(); if semver_version.is_err() {