Bump and publish linux-bzimage crate series with OSTD and OSDK

This commit is contained in:
Zhang Junyang 2024-10-16 01:21:38 +08:00 committed by Tate, Hongliang Tian
parent e6d478c038
commit 3f1fa33b13
6 changed files with 17 additions and 13 deletions

View File

@ -9,15 +9,8 @@ repository = "https://github.com/asterinas/asterinas"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies.linux-bzimage-builder]
# The path for local development
path = "../ostd/libs/linux-bzimage/builder"
# The version specified here is used for publishing on crates.io.
# Please update this version when publishing the cargo-osdk crate
# if there have been any changes to the dependent crate.
version = "0.2.0"
[dependencies]
linux-bzimage-builder = { version = "0.2.0", path = "../ostd/libs/linux-bzimage/builder" }
clap = { version = "4.4.17", features = ["cargo", "derive"] }
chrono = "0.4.38"
env_logger = "0.11.0"

View File

@ -205,10 +205,9 @@ fn install_setup_with_arch(
let crate_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
let setup_dir = crate_dir.join("../ostd/libs/linux-bzimage/setup");
cmd.arg("--path").arg(setup_dir);
} else {
cmd.arg("--version").arg(env!("CARGO_PKG_VERSION"));
}
// Remember to upgrade this version if new version of linux-bzimage-setup is released.
const LINUX_BZIMAGE_SETUP_VERSION: &str = "0.1.0";
cmd.arg("--version").arg(LINUX_BZIMAGE_SETUP_VERSION);
cmd.arg("--target").arg(match arch {
SetupInstallArch::X86_64 => "x86_64-unknown-none",
SetupInstallArch::Other(path) => path.to_str().unwrap(),

View File

@ -28,7 +28,7 @@ inherit-methods-macro = { git = "https://github.com/asterinas/inherit-methods-ma
int-to-c-enum = { path = "../kernel/libs/int-to-c-enum", version = "0.1.0" }
intrusive-collections = { version = "0.9.6", features = ["nightly"] }
lazy_static = { version = "1.0", features = ["spin_no_std"] }
linux-boot-params = { path = "libs/linux-bzimage/boot-params", version = "0.1.0" }
linux-boot-params = { version = "0.1.0", path = "libs/linux-bzimage/boot-params" }
log = "0.4"
num = { version = "0.4", default-features = false }
num-derive = { version = "0.4", default-features = false }

View File

@ -16,7 +16,7 @@ path = "src/main.rs"
cfg-if = "1.0.0"
core2 = { version = "0.4.0", default-features = false, features = ["nightly"] }
libflate = { version = "2.1.0", default-features = false }
linux-boot-params = { path = "../boot-params", version = "0.1.0" }
linux-boot-params = { version = "0.1.0", path = "../boot-params" }
uart_16550 = "0.3.0"
xmas-elf = "0.9.1"

View File

@ -106,6 +106,9 @@ DOCS_DIR=${ASTER_SRC_DIR}/docs
OSTD_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/Cargo.toml
OSTD_TEST_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/libs/ostd-test/Cargo.toml
OSTD_MACROS_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/libs/ostd-macros/Cargo.toml
LINUX_BOOT_PARAMS_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/libs/linux-bzimage/boot-params/Cargo.toml
LINUX_BZIMAGE_BUILDER_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/libs/linux-bzimage/builder/Cargo.toml
LINUX_BZIMAGE_SETUP_CARGO_TOML_PATH=${ASTER_SRC_DIR}/ostd/libs/linux-bzimage/setup/Cargo.toml
OSDK_CARGO_TOML_PATH=${ASTER_SRC_DIR}/osdk/Cargo.toml
OSDK_TEST_RUNNER_CARGO_TOML_PATH=${ASTER_SRC_DIR}/osdk/test-kernel/Cargo.toml
VERSION_PATH=${ASTER_SRC_DIR}/VERSION
@ -125,11 +128,17 @@ new_version=$(bump_version ${current_version})
update_package_version ${OSTD_TEST_CARGO_TOML_PATH}
update_package_version ${OSTD_MACROS_CARGO_TOML_PATH}
update_package_version ${OSTD_CARGO_TOML_PATH}
update_package_version ${LINUX_BOOT_PARAMS_CARGO_TOML_PATH}
update_package_version ${LINUX_BZIMAGE_BUILDER_CARGO_TOML_PATH}
update_package_version ${LINUX_BZIMAGE_SETUP_CARGO_TOML_PATH}
update_dep_version ${OSTD_CARGO_TOML_PATH} ostd-test
update_dep_version ${OSTD_CARGO_TOML_PATH} linux-boot-params
update_dep_version ${OSTD_CARGO_TOML_PATH} ostd-macros
update_dep_version ${LINUX_BZIMAGE_SETUP_CARGO_TOML_PATH} linux-boot-params
update_package_version ${OSDK_CARGO_TOML_PATH}
update_package_version ${OSDK_TEST_RUNNER_CARGO_TOML_PATH}
update_dep_version ${OSDK_TEST_RUNNER_CARGO_TOML_PATH} ostd
update_dep_version ${OSDK_CARGO_TOML_PATH} linux-bzimage-builder
# Automatically bump Cargo.lock files
cargo update -p aster-nix --precise $new_version # For Cargo.lock

View File

@ -60,6 +60,8 @@ do_publish_for() {
}
do_publish_for osdk
do_publish_for ostd/libs/linux-bzimage/build
do_publish_for ostd/libs/linux-bzimage/boot-params
# All supported targets of OSTD, this array should keep consistent with
# `package.metadata.docs.rs.targets` in `ostd/Cargo.toml`.
@ -67,6 +69,7 @@ TARGETS="x86_64-unknown-none"
for TARGET in $TARGETS; do
do_publish_for ostd/libs/ostd-macros $TARGET
do_publish_for ostd/libs/ostd-test $TARGET
do_publish_for ostd/libs/linux-bzimage/setup $TARGET
do_publish_for ostd $TARGET
do_publish_for osdk/test-kernel $TARGET