|
@@ -179,7 +179,12 @@ if ( $embedded_script != "" ) {
|
179
|
179
|
|
180
|
180
|
// Make the requested image. $status is set to 0 on success
|
181
|
181
|
$make_target = "bin/${nic}.${fmt_extension}";
|
182
|
|
-$make_cmd = "make -C '$build_dir' '$make_target' $emb_script_cmd 2>&1";
|
|
182
|
+$gitversion = exec('git describe --always --abbrev=1 --match "" 2>/dev/null');
|
|
183
|
+if ($gitversion) {
|
|
184
|
+ $gitversion = "GITVERSION=$gitversion";
|
|
185
|
+}
|
|
186
|
+
|
|
187
|
+$make_cmd = "make -C '$build_dir' '$make_target' $gitversion $emb_script_cmd 2>&1";
|
183
|
188
|
|
184
|
189
|
exec ( $make_cmd, $maketxt, $status );
|
185
|
190
|
|
|
@@ -239,7 +244,7 @@ if ( $status == 0 ) {
|
239
|
244
|
// Delete build directory as soon as it is not needed
|
240
|
245
|
rm_build_dir ();
|
241
|
246
|
|
242
|
|
- $output_filename = "ipxe-${version}-${nic}.${fmt_extension}";
|
|
247
|
+ $output_filename = preg_replace('/[^a-z0-9\+\.\-]/i', '', "ipxe-${version}-${nic}.${fmt_extension}");
|
243
|
248
|
|
244
|
249
|
// Try to force IE to handle downloading right.
|
245
|
250
|
Header ( "Cache-control: private");
|