Skip to content

Commit

Permalink
Changed name of zip file on windows and linux
Browse files Browse the repository at this point in the history
  • Loading branch information
MrWheatley committed Jul 18, 2022
1 parent 5a79fb4 commit 9f552f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions xtask/src/main.rs
Expand Up @@ -85,15 +85,15 @@ fn dist_binary() -> Result<()> {
Err("copying materials dir failed")?;
}

let archive_file = dist_dir().parent()?.unwrap().join("crosshair-switcher.zip");
let archive_file = dist_dir().parent()?.unwrap().join("crosshair-switcher-windows.zip");
let source_dir = dist_dir();

zip_create_from_directory(
&archive_file.as_path().to_owned(),
&source_dir.as_path().to_owned(),
)?;

fs::copy(&archive_file, dist_dir().join("crosshair-switcher.zip"))?;
fs::copy(&archive_file, dist_dir().join("crosshair-switcher-windows.zip"))?;
fs::remove_file(&archive_file)?;

Ok(())
Expand Down Expand Up @@ -142,15 +142,15 @@ fn dist_binary() -> Result<()> {
Err("copying materials dir failed")?;
}

let archive_file = dist_dir().parent()?.unwrap().join("crosshair-switcher.zip");
let archive_file = dist_dir().parent()?.unwrap().join("crosshair-switcher-linux.zip");
let source_dir = dist_dir();

zip_create_from_directory(
&archive_file.as_path().to_owned(),
&source_dir.as_path().to_owned(),
)?;

fs::copy(&archive_file, dist_dir().join("crosshair-switcher.zip"))?;
fs::copy(&archive_file, dist_dir().join("crosshair-switcher-linux.zip"))?;
fs::remove_file(&archive_file)?;

Ok(())
Expand Down

0 comments on commit 9f552f9

Please sign in to comment.