Skip to content

Commit 90893ad

Browse files
Merge pull request #512 from jacobwilliams/505-version
added version string as protected module variable
2 parents 2e196ec + 6483ba6 commit 90893ad

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=5),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)