diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6277576a..f25774df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: run: ./build_with_docker.sh --finalversion - name: Derive short commit hash id: vars - run: echo "short_sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT" + run: echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" - name: Rename PDFs with commit hash run: | mv pdfs/acle.pdf "pdfs/acle-${{ steps.vars.outputs.short_sha }}.pdf" @@ -76,7 +76,7 @@ jobs: path: pdfs - name: Derive short commit hash id: vars - run: echo "short_sha=${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT" + run: echo "short_sha=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT" - name: Delete previous Latest release (if any) env: GH_TOKEN: ${{ github.token }} diff --git a/_includes/navbar.html b/_includes/navbar.html index 5653d8a7..7fcc7d38 100644 --- a/_includes/navbar.html +++ b/_includes/navbar.html @@ -18,9 +18,9 @@ {% assign hash = site.commithash | default: site.github.build_revision %} {% if hash %} - {% assign short_hash = hash | slice: 0, 12 %} + {% assign short_hash = hash | slice: 0, 7 %} {% if site.finalversion %} - Version: {{ hash }}  :::  + Version: {{ short_hash }}  :::  {% elsif site.cleanrepo %} Version: Dev version ({{ short_hash }})  :::  {% else %} diff --git a/tools/acle_template.tex b/tools/acle_template.tex index 7626c373..f4083416 100644 --- a/tools/acle_template.tex +++ b/tools/acle_template.tex @@ -28,6 +28,7 @@ \usepackage{graphicx} \usepackage[$if(landscape)$landscape,$endif$top=3.7cm,bottom=2.7cm,left=3cm,right=2cm,headsep=1.5cm,footskip=.5cm]{geometry} \usepackage{lastpage} +\usepackage{xstring} % Add extra space to table rows \renewcommand{\arraystretch}{2} @@ -37,14 +38,16 @@ \patchcmd{\footrule}{\hrule}{\color{darkgray}\hrule}{}{} \makeatother +\StrLeft{$commithash$}{7}[\GitHashShort] + \sectionfont{\color{armblue}} $if(finalversion)$ - \newcommand{\versiontext}{\href{https://github.com/ARM-software/acle/commit/$commithash$}{$commithash$}} + \newcommand{\versiontext}{\href{https://github.com/ARM-software/acle/commit/$commithash$}{\GitHashShort}} $else$ $if(cleanrepo)$ - \newcommand{\versiontext}{\textcolor{red}{Development version based on \href{https://github.com/ARM-software/acle/commit/$commithash$}{$commithash$}}} + \newcommand{\versiontext}{\textcolor{red}{Development version based on \href{https://github.com/ARM-software/acle/commit/$commithash$}{\GitHashShort}}} $else$ - \newcommand{\versiontext}{\textcolor{red}{Development version based on \href{https://github.com/ARM-software/acle/commit/$commithash$}{$commithash$}, with modifications}} + \newcommand{\versiontext}{\textcolor{red}{Development version based on \href{https://github.com/ARM-software/acle/commit/$commithash$}{\GitHashShort}, with modifications}} $endif$ $endif$ \newcommand{\dateofissue}{$date-of-issue$}