Skip to content

Commit 8a33d9b

Browse files
committed
added a protected module variable that contains the version number string.
Fixes #505
1 parent 444a612 commit 8a33d9b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pages/development-resources/release-checklist.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ remain accurate.
5353
1. Update the version string in remaining files requiring manual edits:
5454
1. Edit the `.VERSION` file
5555
1. Edit the CMake example on line 124 of `README.md`
56-
1. Add both files to the git index: `git add .VERSION
57-
README.md`
56+
1. Edit the `json_fortran_version` string in `json_module.F90`
57+
1. Add these files to the git index: `git add .VERSION README.md ./src/json_module.F90`
5858
1. Commit the changes to the master branch: `git commit`
5959
1. Create the tag: `git tag <new version>`
6060
1. Note: for some reason, using GitHub to tag a project means that the tag doesn't show up when you `git describe` the project. Tagging from the command line makes `git describe` work as expected.

src/json_module.F90

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ module json_module
7373

7474
implicit none
7575

76+
character(kind=json_CK,len=*),parameter,protected :: json_fortran_version = '8.2.5'
77+
!! JSON-Fortran version.
78+
!!
79+
!!@note This string should match the one in the `.VERSION` file (which is used
80+
!! for the documentation generation.)
81+
7682
public
7783

7884
end module json_module

src/tests/jf_test_01.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ subroutine test_1(error_cnt)
5757
write(error_unit,'(A)') '================================='
5858
write(error_unit,'(A)') ''
5959

60+
write(error_unit,'(A)') 'JSON-Fortran version: '//json_fortran_version
61+
6062
! parse the json file:
6163
write(error_unit,'(A)') ''
6264
write(error_unit,'(A)') 'parsing file '//dir//filename1

0 commit comments

Comments
 (0)