mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 13:21:50 +02:00
precommit update
This commit is contained in:
10
.github/prehooks/pre-commit
vendored
10
.github/prehooks/pre-commit
vendored
@ -59,19 +59,21 @@ echo "Updating semantic versioning and date..."
|
||||
git fetch origin --prune --prune-tags --quiet
|
||||
currenttagfull=`git describe --tags --abbrev=0`
|
||||
currenttag=`git describe --tags --abbrev=0 | sed 's/v//'`
|
||||
# assume main branch to be 'main' or 'master', pick the right name:
|
||||
defaultbranch=`git branch | cut -c 3- | grep -E '^master$|^main$'`
|
||||
if [ "$currenttag" = "" ]; then
|
||||
# there is no tag, so set tag to 0.0.1 and commit index to current count
|
||||
echo "- no git tags found, create one in this format: 'v(x).(y).(z)'!"
|
||||
currenttag="0.0.1"
|
||||
currentcommit=`git rev-list --count HEAD`
|
||||
currentcommit=`git rev-list --count ${defaultbranch}`
|
||||
echo "- no git tags found, create one in format 'v(x).(y).(z)' - curently ${currentcommit} previous commits in ${defaultbranch}"
|
||||
else
|
||||
# there is a tag, so base version number on that
|
||||
currentcommit=`git rev-list --count ${currenttagfull}..HEAD`
|
||||
currentcommit=`git rev-list --count ${currenttagfull}..${defaultbranch}`
|
||||
if (( "$currentcommit" == 0 )); then
|
||||
# tag is new, so this must become the version number
|
||||
currentversion="$currenttag"
|
||||
fi
|
||||
echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits"
|
||||
echo "- latest tag is '${currenttagfull}', with ${currentcommit} previous commits in ${defaultbranch}"
|
||||
fi
|
||||
if [ "$currentversion" = "" ]; then
|
||||
# combine tag (e.g. 1.2.3) and commit number (like 5) increased by 9000 to indicate beta version
|
||||
|
2
.github/workflows/check-release.yaml
vendored
2
.github/workflows/check-release.yaml
vendored
@ -59,6 +59,7 @@ jobs:
|
||||
- {os: ubuntu-22.04, r: '4.1', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
- {os: ubuntu-22.04, r: '4.0', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
- {os: ubuntu-22.04, r: '3.6', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
# R 3.5 returns a strange GC error when running examples, omit the checks for that
|
||||
# - {os: ubuntu-22.04, r: '3.5', allowfail: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
- {os: ubuntu-22.04, r: '3.4', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
- {os: ubuntu-22.04, r: '3.3', allowfail: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest"}
|
||||
@ -154,6 +155,7 @@ jobs:
|
||||
|
||||
- name: Upload artifacts
|
||||
if: always()
|
||||
continue-on-error: true
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: artifacts-${{ matrix.config.os }}-r${{ matrix.config.r }}
|
||||
|
Reference in New Issue
Block a user