Skip to content

Commit 29b7c9d

Browse files
add git versions source files within Eirene branch
1 parent 0f635bd commit 29b7c9d

2 files changed

Lines changed: 44 additions & 11 deletions

File tree

‎src/user-routines/user_EDGE2D/git_Edge2d_info.f‎

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
SUBROUTINE EIRENE_SHOW_GIT_INFO(LOUT)
2+
3+
use eirene_provenance
24
implicit none
35
integer, intent(in) :: LOUT
46

@@ -10,23 +12,23 @@ SUBROUTINE EIRENE_SHOW_GIT_INFO(LOUT)
1012
WRITE (LOUT,*) "----------------------------------------------"
1113

1214
WRITE(LOUT,"(a,a)") " Current GIT repository: ",
13-
&__GITREPOSITORY
15+
&trim(git_repository)
1416
WRITE(LOUT,"(a,a)") " Current GIT release tag: ",
15-
&__GITRELEASETAG
17+
&git_release_tag
1618
WRITE(LOUT,"(a,a)") " Current GIT branch: ",
17-
&__GITBRANCHNAME
19+
&git_branch
1820
WRITE(LOUT,"(a,a)") " Last commit SHA1-key: ",
19-
&__GITSHAKEY
21+
&trim(git_head_sha1)
2022
WRITE(LOUT,"(a,a)") " Hostname at compilation: ",
21-
&__HOSTNAME
22-
if (__GITSTATUSSTRING.eq."modyf") then
23+
&trim(hostname)
24+
if (git_is_dirty.eq."true") then
2325
WRITE (LOUT,*) ""
2426
WRITE (LOUT,*) "********************************************"
2527
WRITE (LOUT,*) "*** WARNING: ***"
2628
WRITE (LOUT,*) "*** There were uncommitted changes in ***"
2729
WRITE (LOUT,*) "*** the repository during compilation. ***"
2830
WRITE (LOUT,*) "*** This executable may not be ***"
29-
WRITE (LOUT,*) "*** reproducible by it's SHA1-key! ***"
31+
WRITE (LOUT,*) "*** reproducible by its SHA1-key! ***"
3032
WRITE (LOUT,*) "********************************************"
3133
endif
3234

@@ -44,6 +46,10 @@ SUBROUTINE EIRENE_SHOW_GIT_INFO_SHORT(LOUT)
4446
C INPUT : LOUT - Unit number for output
4547
C
4648
C***********************************************************************
49+
50+
use eirene_provenance
51+
use cmgutil_util, only: lenstr
52+
4753
implicit none
4854
INTEGER, intent(in) :: LOUT
4955
C
@@ -54,10 +60,10 @@ SUBROUTINE EIRENE_SHOW_GIT_INFO_SHORT(LOUT)
5460
C
5561
C
5662
WRITE(LOUT,"(a,a)") " EIRENE GIT repository : ",
57-
& __GITREPOSITORY
58-
CSTR=__GITSHAKEY
59-
if (__GITSTATUSSTRING.eq."modyf") then
60-
CSTR=CSTR(1:LEN_TRIM(CSTR))//" ( + uncommitted changes !! )"
63+
& trim(git_repository)
64+
CSTR=git_head_sha1
65+
if (git_is_dirty.eq."true") then
66+
CSTR=CSTR(1:LENSTR(CSTR))//" ( + uncommitted changes !! )"
6167
ENDIF
6268
WRITE(LOUT,"(a,a)") " EIRENE SHA1-key : ",CSTR
6369

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
C> \brief Print EIRENEs git version hash.
2+
C>
3+
C> Prints/sends the date, branch and version hash of EIRENE to the
4+
C> usual output unit.
5+
SUBROUTINE EIRENE_VERSION
6+
USE EIRENE_PROVENANCE
7+
USE EIRMOD_PARMMOD, ONLY: EIRENE_VERSION_STRING
8+
USE EIRMOD_COMPRT, ONLY: IUNOUT
9+
IMPLICIT NONE
10+
EXTERNAL :: EIRENE_HEADNG, EIRENE_LEER
11+
12+
WRITE(IUNOUT,'(2A)') ' EIRENE VERSION ',EIRENE_VERSION_STRING
13+
CALL EIRENE_LEER(2)
14+
15+
CALL EIRENE_HEADNG('GIT REVISION USED IN THIS RUN',29)
16+
17+
WRITE(IUNOUT,*) 'DESCRIPTION:',
18+
. git_describe
19+
WRITE(IUNOUT,*) 'DATE: ',
20+
. git_commit_date
21+
WRITE(IUNOUT,*) 'HASH: ',
22+
. git_head_sha1
23+
WRITE(IUNOUT,*) 'BRANCH: ',
24+
. git_branch
25+
26+
RETURN
27+
END SUBROUTINE EIRENE_VERSION

0 commit comments

Comments
 (0)