From ba71c5609571fb5c5eb7c9660bbbc0d679cf6594 Mon Sep 17 00:00:00 2001 From: Henil Panchal Date: Sat, 24 Feb 2024 11:45:24 +0530 Subject: [PATCH] add fpm_model.json in the build archive --- src/fpm/git.f90 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/fpm/git.f90 b/src/fpm/git.f90 index c007743a90..1ccaf8eebb 100644 --- a/src/fpm/git.f90 +++ b/src/fpm/git.f90 @@ -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