Skip to content

Bump Distribution Date #1162

Bump Distribution Date

Bump Distribution Date #1162

Workflow file for this run

#
# bump-date.yml
# Bump the distribution date once per day
#
name: Bump Distribution Date
on:
schedule:
- cron: '0 12 */2 * *'
jobs:
bump_date:
name: Bump Distribution Date
if: github.repository == 'classicrocker883/MRiscoCProUI'
runs-on: ubuntu-latest
steps:
- name: Check out 2023-September
uses: actions/checkout@v3
with:
ref: 2023-September
- name: Bump Date (2023-September)
run: |
# Inline Bump Script
if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
DIST=$( date +"%Y-%m-%d" )
sed -E -i "s/(\/\/#define +STRING_DISTRIBUTION_DATE) .*/\1 \"$DIST\"/g" Marlin/configurations/Voxelab\ Aquila/BLT/Version.h && \
sed -E -i 's/(\/\/#define STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/configurations/Voxelab\ Aquila/MM/Version.h && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\2 \"$DIST\"/g' Marlin/configurations/Voxelab\ Aquila/UBL/Version.h" && \
eval "sed -E -i 's/(#define STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/configurations/Voxelab\ Aquila/X3/Version.h" && \
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
eval "sed -E -i 's/(//#define STRING_DISTRIBUTION_DATE) .*$/\2 \"$DIST\"/g' Marlin/Version.h" && \
git config user.name "classicrocker883" && \
git config user.email "[email protected]" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
fi
exit 0