forked from mriscoc/Ender3V2S1
-
-
Notifications
You must be signed in to change notification settings - Fork 19
43 lines (36 loc) · 1.59 KB
/
bump-date.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# 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