Skip to content

Commit f8190b0

Browse files
committed
Add fpm-update to fpm-help/fpm-list output
1 parent ea80149 commit f8190b0

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

fpm/src/fpm/cmd/update.f90

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ subroutine cmd_update(settings)
3939
call deps%add(package, error)
4040
call handle_error(error)
4141

42+
if (settings%fetch_only) return
43+
4244
if (size(settings%name) == 0) then
4345
do ii = 1, deps%ndep
4446
call deps%update(deps%dep(ii)%name, error)

fpm/src/fpm_command_line.f90

+4-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ module fpm_command_line
5555
type, extends(fpm_cmd_settings) :: fpm_update_settings
5656
character(len=ibug),allocatable :: name(:)
5757
logical :: fetch_only
58-
logical :: verbose
5958
logical :: clean
6059
end type
6160

@@ -416,6 +415,7 @@ subroutine set_help()
416415
' new Create a new Fortran package directory with sample files ', &
417416
' run Run the local package application programs ', &
418417
' test Run the test programs ', &
418+
' update Update and manage project dependencies ', &
419419
' ', &
420420
' Enter "fpm --list" for a brief list of subcommand options. Enter ', &
421421
' "fpm --help" or "fpm SUBCOMMAND --help" for detailed descriptions. ', &
@@ -425,6 +425,7 @@ subroutine set_help()
425425
' build [--compiler COMPILER_NAME] [--release] [--list] ', &
426426
' help [NAME(s)] ', &
427427
' new NAME [--lib|--src] [--app] [--test] [--backfill] ', &
428+
' update [NAME(s)] [--fetch-only] [--clean] [--verbose] ', &
428429
' list [--list] ', &
429430
' run [[--target] NAME(s)] [--release] [--runner "CMD"] [--list] ', &
430431
' [--compiler COMPILER_NAME] [-- ARGS] ', &
@@ -524,6 +525,7 @@ subroutine set_help()
524525
' ', &
525526
' + build Compile the packages into the "build/" directory. ', &
526527
' + new Create a new Fortran package directory with sample files. ', &
528+
' + update Update the project dependencies. ', &
527529
' + run Run the local package binaries. defaults to all binaries for ', &
528530
' that release. ', &
529531
' + test Run the tests. ', &
@@ -534,6 +536,7 @@ subroutine set_help()
534536
' ', &
535537
' build [--release] [--list] [--compiler COMPILER_NAME] ', &
536538
' new NAME [--lib|--src] [--app] [--test] [--backfill] ', &
539+
' update [NAME(s)] [--fetch-only] [--clean] ', &
537540
' run|test [[--target] NAME(s)] [--release] [--list] ', &
538541
' [--runner "CMD"] [--compiler COMPILER_NAME] [-- ARGS] ', &
539542
' help [NAME(s)] ', &

fpm/test/help_test/help_test.f90

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ program help_test
2222
'fpm run -- --version ',& ! verify fpm version being used
2323
'fpm run -- --help > fpm_scratch_help.txt',&
2424
'fpm run -- help new >> fpm_scratch_help.txt',&
25+
'fpm run -- help update >> fpm_scratch_help.txt',&
2526
'fpm run -- build --help >> fpm_scratch_help.txt',&
2627
'fpm run -- help run >> fpm_scratch_help.txt',&
2728
'fpm run -- help test >> fpm_scratch_help.txt',&
@@ -33,6 +34,7 @@ program help_test
3334
'fpm run --release -- --version ',& ! verify fpm version being used
3435
'fpm run --release -- --help > fpm_scratch_help3.txt',&
3536
'fpm run --release -- help new >> fpm_scratch_help3.txt',&
37+
'fpm run --release -- help update >> fpm_scratch_help3.txt',&
3638
'fpm run --release -- build --help >> fpm_scratch_help3.txt',&
3739
'fpm run --release -- help run >> fpm_scratch_help3.txt',&
3840
'fpm run --release -- help test >> fpm_scratch_help3.txt',&
@@ -46,7 +48,7 @@ program help_test
4648
!'fpm run >> fpm_scratch_help.txt',&
4749
!'fpm run -- --list >> fpm_scratch_help.txt',&
4850
!'fpm run -- list --list >> fpm_scratch_help.txt',&
49-
character(len=*),parameter :: names(*)=[character(len=10) :: 'fpm','new','build','run','test','runner','list','help']
51+
character(len=*),parameter :: names(*)=[character(len=10) :: 'fpm','new','update','build','run','test','runner','list','help']
5052
character(len=:),allocatable :: add
5153

5254
write(*,'(g0:,1x)')'<INFO>TEST help SUBCOMMAND STARTED'

0 commit comments

Comments
 (0)