We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
GIT_PATCH
2 parents 72952e5 + eb3ec31 commit 43d511dCopy full SHA for 43d511d
src/download.rs
@@ -132,8 +132,13 @@ impl Download {
132
env: &HashMap<&String, String>,
133
) -> Result<Vec<String>> {
134
let patches = self.patches.as_ref().unwrap();
135
+ let mut rule_env = IndexMap::new();
136
let rulename = match &self.source {
- Source::Git { .. } => "GIT_PATCH",
137
+ Source::Git(Git::Commit { url, commit }) => {
138
+ rule_env.insert("commit".to_string(), commit.to_string());
139
+ rule_env.insert("url".to_string(), url.to_string());
140
+ "GIT_PATCH"
141
+ }
142
_ => return Err(anyhow!("unsupported download type for patching")),
143
};
144
@@ -163,6 +168,7 @@ impl Download {
163
168
.inputs(patches)
164
169
.out(tagfile_patched.as_path())
165
170
.deps(Some(download_dep))
171
+ .env(&rule_env)
166
172
.build()
167
173
.unwrap();
174
0 commit comments