Added git info script
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 30s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 30s
This commit is contained in:
@@ -10,6 +10,7 @@ jobs:
|
|||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
|
- run: echo "The ${{ gitea.repository }} repository has been cloned to the runner."
|
||||||
|
- run: create_git_info_file.sh
|
||||||
- run: echo "Starting first LaTeX build"
|
- run: echo "Starting first LaTeX build"
|
||||||
- run: pdflatex fat.tex
|
- run: pdflatex fat.tex
|
||||||
- run: echo "Starting second LaTeX build"
|
- run: echo "Starting second LaTeX build"
|
||||||
|
|||||||
24
create_git_info_file.sh
Normal file
24
create_git_info_file.sh
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Get the first tag found in the history from the current HEAD
|
||||||
|
FIRSTTAG=$(git describe --tags --always --dirty='-*' 2>/dev/null)
|
||||||
|
# Get the first tag in history that looks like a Release
|
||||||
|
RELTAG=$(git describe --tags --long --always --dirty='-*' --match '[0-9]*.*' 2>/dev/null)
|
||||||
|
# Hoover up the metadata
|
||||||
|
git --no-pager log -1 --date=short --decorate=short \
|
||||||
|
--pretty=format:"\usepackage[%
|
||||||
|
shash={%h},
|
||||||
|
lhash={%H},
|
||||||
|
authname={%an},
|
||||||
|
authemail={%ae},
|
||||||
|
authsdate={%ad},
|
||||||
|
authidate={%ai},
|
||||||
|
authudate={%at},
|
||||||
|
commname={%cn},
|
||||||
|
commemail={%ce},
|
||||||
|
commsdate={%cd},
|
||||||
|
commidate={%ci},
|
||||||
|
commudate={%ct},
|
||||||
|
refnames={%d},
|
||||||
|
firsttagdescribe={$FIRSTTAG},
|
||||||
|
reltag={$RELTAG}
|
||||||
|
]{gitexinfo}" HEAD > .git/gitHeadInfo.gin
|
||||||
Reference in New Issue
Block a user