Skip to content

Commit b15389e

Browse files
authored
Merge pull request #889 from HuijingHei/build-srpm
xtask: create target dir before make srpm
2 parents 78dc8d3 + 409144f commit b15389e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

xtask/src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::fs::File;
22
use std::io::{BufRead, BufReader, BufWriter, Write};
3-
use std::process::{Command, Stdio};
3+
use std::process::Command;
44

55
use anyhow::{Context, Result};
66
use camino::{Utf8Path, Utf8PathBuf};
@@ -76,6 +76,7 @@ fn gitrev(sh: &Shell) -> Result<String> {
7676

7777
/// Return a string formatted version of the git commit timestamp, up to the minute
7878
/// but not second because, well, we're not going to build more than once a second.
79+
#[allow(dead_code)]
7980
#[context("Finding git timestamp")]
8081
fn git_timestamp(sh: &Shell) -> Result<String> {
8182
let ts = cmd!(sh, "git show -s --format=%ct").read()?;
@@ -236,6 +237,7 @@ fn impl_srpm(sh: &Shell) -> Result<Utf8PathBuf> {
236237
}
237238

238239
fn package_srpm(sh: &Shell) -> Result<()> {
240+
let _targetdir = get_target_dir()?;
239241
let srpm = impl_srpm(sh)?;
240242
println!("Generated: {srpm}");
241243
Ok(())

0 commit comments

Comments
 (0)