tisonkun commented on code in PR #5592:
URL: https://github.com/apache/opendal/pull/5592#discussion_r1938279432


##########
dev/src/release/mod.rs:
##########
@@ -0,0 +1,100 @@
+use crate::{find_command, workspace_dir};
+use flate2::write::GzEncoder;
+use flate2::Compression;
+use sha2::{Digest, Sha512};
+use std::io::BufReader;
+
+mod package;
+
+pub fn update_version() -> anyhow::Result<()> {
+    let packages = package::all_packages();
+    let mut updated = false;
+    for package in packages {
+        updated |= package::update_package_version(&package);
+    }
+    if !updated {
+        println!("all package versions are up-to-date");
+    }
+    Ok(())
+}
+
+pub fn archive_package() -> anyhow::Result<()> {
+    std::fs::create_dir_all(workspace_dir().join("dist"))?;
+
+    let workspace_dir = workspace_dir();
+    let dist_dir = workspace_dir.join("dist");
+
+    let packages = package::all_packages();
+    for package in packages {
+        let mut cmd = find_command("git", &workspace_dir);
+        cmd.args(["ls-files", "LICENSE", "NOTICE"]);
+        cmd.arg(&package.name);
+        for dep in &package.dependencies {
+            cmd.arg(&dep.name);
+        }
+        let output = cmd.output().expect("failed to execute git ls-files");
+        let output = String::from_utf8_lossy(&output.stdout);
+        let files = output.lines().collect::<Vec<_>>();
+        archive_and_checksum(&package, &files)?;
+
+        let prefix = format!("apache-opendal-{}-src", 
package.name.replace("/", "-"));

Review Comment:
   Need to add the version to prefix



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to