Skip to content

Commit

Permalink
add version tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 23, 2023
1 parent df3bff4 commit b43fe5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/bumpversion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ jobs:
create_annotated_tag: true
default_bump: patch
dry_run: true
tag_prefix: cprnc-
tag_prefix: v
- name: Update version.txt
run: |
echo "${{ steps.name_tag.outputs.new_tag }}" > version.txt
echo "character(len=*), parameter :: version=\"${{ steps.name_tag.outputs.new_tag }}\"" > version.inc
- name: Amend the last commit
run: |
git config --global user.email "[email protected]"
Expand All @@ -43,4 +43,4 @@ jobs:
create_annotated_tag: true
default_bump: patch
dry_run: false
tag_prefix: cprnc-
tag_prefix: v
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ if ("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU")
endif()

if (CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -g")
set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -O0 -g")
endif()

set (CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -D_VERSION_=\"v1.0.0\"")

#==============================================================================
# DEFINE THE DEPENDENCIES
Expand Down
6 changes: 4 additions & 2 deletions cprnc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ program piocprnc
use f90_unix
#endif
implicit none

include "version.inc"
integer :: nargs, n
character(len=1024) :: arg = '' ! cmd-line argument
character(len=1024) :: fname(2) = ' ' ! input filenames
Expand Down Expand Up @@ -37,7 +37,6 @@ program piocprnc
! Parse arg list
!


nargs = command_argument_count ()
dimoptioncnt=0
ignoretime=.false.
Expand All @@ -47,6 +46,9 @@ program piocprnc
call getarg (n, arg)
n = n + 1
select case (arg)
case ('-V')
print *,"cprnc version:", version
stop
case ('-v')
verbose = .true.
case ('-d')
Expand Down

0 comments on commit b43fe5f

Please sign in to comment.