@@ -121,6 +121,7 @@ module fpm_command_line
121
121
type, extends(fpm_build_settings) :: fpm_publish_settings
122
122
logical :: show_package_version = .false.
123
123
logical :: show_upload_data = .false.
124
+ logical :: is_dry_run = .false.
124
125
character (len= :), allocatable :: token
125
126
end type
126
127
@@ -168,7 +169,7 @@ module fpm_command_line
168
169
' --flag FFLAGS selects compile arguments for the build, the default value is' ,&
169
170
' set by the FPM_FFLAGS environment variable. These are added ' ,&
170
171
' to the profile options if --profile is specified, else these ' ,&
171
- ' these options override the defaults. Note object and .mod ' ,&
172
+ ' options override the defaults. Note object and .mod ' ,&
172
173
' directory locations are always built in. ' ,&
173
174
' --c-flag CFLAGS selects compile arguments specific for C source in the build.' ,&
174
175
' The default value is set by the FPM_CFLAGS environment ' ,&
@@ -621,6 +622,7 @@ subroutine get_command_line_settings(cmd_settings)
621
622
call set_args(common_args // compiler_args // ' &
622
623
& --show-package-version F &
623
624
& --show-upload-data F &
625
+ & --dry-run F &
624
626
& --token " " &
625
627
& --list F &
626
628
& --show-model F &
@@ -638,6 +640,7 @@ subroutine get_command_line_settings(cmd_settings)
638
640
cmd_settings = fpm_publish_settings( &
639
641
& show_package_version = lget(' show-package-version' ), &
640
642
& show_upload_data = lget(' show-upload-data' ), &
643
+ & is_dry_run = lget(' dry-run' ), &
641
644
& profile= val_profile,&
642
645
& prune= .not. lget(' no-prune' ), &
643
646
& compiler= val_compiler, &
@@ -754,7 +757,8 @@ subroutine set_help()
754
757
' install [--profile PROF] [--flag FFLAGS] [--no-rebuild] [--prefix PATH] ' , &
755
758
' [options] ' , &
756
759
' clean [--skip] [--all] ' , &
757
- ' publish [--show-package-version] [--show-upload-data] [--token TOKEN] ' , &
760
+ ' publish [--token TOKEN] [--show-package-version] [--show-upload-data] ' , &
761
+ ' [--dry-run] [--verbose] ' , &
758
762
' ' ]
759
763
help_usage= [character (len= 80 ) :: &
760
764
' ' ]
@@ -878,7 +882,8 @@ subroutine set_help()
878
882
' install [--profile PROF] [--flag FFLAGS] [--no-rebuild] [--prefix PATH] ' , &
879
883
' [options] ' , &
880
884
' clean [--skip] [--all] ' , &
881
- ' publish [--show-package-version] [--show-upload-data] [--token TOKEN] ' , &
885
+ ' publish [--token TOKEN] [--show-package-version] [--show-upload-data] ' , &
886
+ ' [--dry-run] [--verbose] ' , &
882
887
' ' , &
883
888
' SUBCOMMAND OPTIONS ' , &
884
889
' -C, --directory PATH' , &
@@ -1362,6 +1367,7 @@ subroutine set_help()
1362
1367
' ' , &
1363
1368
' SYNOPSIS' , &
1364
1369
' fpm publish [--token TOKEN] [--show-package-version] [--show-upload-data]' , &
1370
+ ' [--dry-run] [--verbose] ' , &
1365
1371
' ' , &
1366
1372
' fpm publish --help|--version' , &
1367
1373
' ' , &
@@ -1379,7 +1385,7 @@ subroutine set_help()
1379
1385
' But be aware that the upload is permanent. An uploaded package cannot be' , &
1380
1386
' deleted.' , &
1381
1387
' ' , &
1382
- ' See documentation for more information regarding the package upload and usage:' , &
1388
+ ' See documentation for more information regarding package upload and usage:' , &
1383
1389
' ' , &
1384
1390
' Package upload:' , &
1385
1391
' https://fpm.fortran-lang.org/en/spec/publish.html' , &
@@ -1389,15 +1395,18 @@ subroutine set_help()
1389
1395
' ' , &
1390
1396
' OPTIONS' , &
1391
1397
' --show-package-version show package version without publishing' , &
1392
- ' --show-upload-data show uploaded data without publishing' , &
1398
+ ' --show-upload-data show upload data without publishing' , &
1399
+ ' --dry-run perform dry run without publishing' , &
1393
1400
' --help print this help and exit' , &
1394
1401
' --version print program version information and exit' , &
1402
+ ' --verbose print more information' , &
1395
1403
' ' , &
1396
1404
' EXAMPLES' , &
1397
1405
' ' , &
1398
- ' fpm publish --show-package-version # show package version without publishing' , &
1399
- ' fpm publish --show-upload-data # show upload data without publishing' , &
1400
- ' fpm publish --token TOKEN # upload package to the registry using TOKEN' , &
1406
+ ' fpm publish --show-package-version # show package version without publishing' , &
1407
+ ' fpm publish --show-upload-data # show upload data without publishing' , &
1408
+ ' fpm publish --token TOKEN --dry-run # perform dry run without publishing' , &
1409
+ ' fpm publish --token TOKEN # upload package to the registry' , &
1401
1410
' ' ]
1402
1411
end subroutine set_help
1403
1412
0 commit comments