Skip to content
Snippets Groups Projects
Commit 57e37b6c authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Fix daily date bump action

parent 07509feb
Branches
No related tags found
No related merge requests found
...@@ -22,4 +22,13 @@ jobs: ...@@ -22,4 +22,13 @@ jobs:
ref: bugfix-2.0.x ref: bugfix-2.0.x
- name: Bump Distribution Date - name: Bump Distribution Date
run: source ./buildroot/bin/bump_date run: |
# Inline Bump Script
[[ "$GITHUB_ACTOR" == 'MarlinFirmware' ]] || exit 0
DIST=$( date +"%Y-%m-%d" )
eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
git config user.name "${GITHUB_ACTOR}" && \
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
git add . && \
git commit -m "[cron] Bump distribution date ($DIST)" && \
git push
#!/usr/bin/env bash
#
# bump_date
#
# Bump the Distribution Date in Version.h
#
VERSION_FILE=Marlin/src/inc/Version.h
SED=$(which gsed || which sed)
DIST=$( date +"%Y-%m-%d" )
eval "${SED} -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' $VERSION_FILE" || exit 1
git add "$VERSION_FILE" || exit 1
git commit -m "[cron] Bump distribution date ($DIST)"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment