Skip to content

Commit

Permalink
add fpm_model.json in the build archive
Browse files Browse the repository at this point in the history
  • Loading branch information
henilp105 committed Feb 24, 2024
1 parent 5bc7f90 commit ba71c56
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/fpm/git.f90
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,13 @@ subroutine git_archive(source, destination, ref, verbose, error)
call fatal_error(error, "Cannot find a suitable archive format for 'git archive'."); return
end if

call run('git archive '//ref//' --format='//archive_format//' -o '//destination, echo=verbose, exitstat=stat)
call run('fpm build --dump fpm_model.json', echo=verbose, exitstat=stat)
call run('git archive ' &
// ref // &
' --format=' // archive_format // &
' -o ' // destination // &
' --add-file=fpm_model.json', echo=verbose, exitstat=stat)
call run('rm fpm_model.json', echo=verbose, exitstat=stat)
if (stat /= 0) then
call fatal_error(error, "Error packing '"//source//"'."); return
end if
Expand Down

0 comments on commit ba71c56

Please sign in to comment.