Skip to content

Commit ba71c56

Browse files
committed
add fpm_model.json in the build archive
1 parent 5bc7f90 commit ba71c56

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/fpm/git.f90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,13 @@ subroutine git_archive(source, destination, ref, verbose, error)
333333
call fatal_error(error, "Cannot find a suitable archive format for 'git archive'."); return
334334
end if
335335

336-
call run('git archive '//ref//' --format='//archive_format//' -o '//destination, echo=verbose, exitstat=stat)
336+
call run('fpm build --dump fpm_model.json', echo=verbose, exitstat=stat)
337+
call run('git archive ' &
338+
// ref // &
339+
' --format=' // archive_format // &
340+
' -o ' // destination // &
341+
' --add-file=fpm_model.json', echo=verbose, exitstat=stat)
342+
call run('rm fpm_model.json', echo=verbose, exitstat=stat)
337343
if (stat /= 0) then
338344
call fatal_error(error, "Error packing '"//source//"'."); return
339345
end if

0 commit comments

Comments
 (0)