This repository has been archived on 2022-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
Marlin-Artillery-M600/buildroot/bin/bump_date
2019-12-20 19:11:53 -06:00

17 lines
372 B
Bash
Executable file

#!/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)"