From 41a9dea149902fd6525919a0163303a9b2f3be76 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 5 Jun 2022 20:25:58 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=94=20Update=20Marlin=20actions=20for?= =?UTF-8?q?=202.1.x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/bump-date.yml | 22 +++++++++++++++++++++- .github/workflows/check-pr.yml | 5 +++-- .github/workflows/test-builds.yml | 2 ++ buildroot/bin/use_example_configs | 4 +++- 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bump-date.yml b/.github/workflows/bump-date.yml index d517d7d05e..51b58ad493 100644 --- a/.github/workflows/bump-date.yml +++ b/.github/workflows/bump-date.yml @@ -23,7 +23,27 @@ jobs: with: ref: bugfix-2.1.x - - name: Bump Distribution Date + - name: Bump Date (bugfix-2.0.x) + run: | + # Inline Bump Script + if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then + DIST=$( date +"%Y-%m-%d" ) + 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) .*$/\1 \"$DIST\"/g' Marlin/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 + fi + exit 0 + + - name: Check out bugfix-2.1.x + uses: actions/checkout@v2 + with: + ref: bugfix-2.1.x + + - name: Bump Date (bugfix-2.1.x) run: | # Inline Bump Script if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then diff --git a/.github/workflows/check-pr.yml b/.github/workflows/check-pr.yml index fe64b83338..79d0b5e2d0 100644 --- a/.github/workflows/check-pr.yml +++ b/.github/workflows/check-pr.yml @@ -12,6 +12,7 @@ on: - 1.0.x - 1.1.x - 2.0.x + - 2.1.x jobs: bad_target: @@ -26,8 +27,8 @@ jobs: comment: > Thanks for your contribution! Unfortunately we can't accept PRs directed at release branches. We make patches to the bugfix branches and only later do we push them out as releases. - Please redo this PR starting with the `bugfix-2.1.x` branch and be careful to target `bugfix-2.1.x` when resubmitting the PR. + Please redo this PR starting with the `bugfix-2.1.x` branch and be careful to target `bugfix-2.1.x` when resubmitting the PR. Patches may also target `bugfix-2.0.x` if they are specifically for 2.0.9.x. - It may help to set your fork's default branch to `bugfix-2.1.x`. + It may help to set your fork's default branch to `bugfix-2.0.x`. See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions. diff --git a/.github/workflows/test-builds.yml b/.github/workflows/test-builds.yml index 2ad77003cc..747095e07f 100644 --- a/.github/workflows/test-builds.yml +++ b/.github/workflows/test-builds.yml @@ -8,6 +8,7 @@ name: CI on: pull_request: branches: + - bugfix-2.0.x - bugfix-2.1.x paths-ignore: - config/** @@ -16,6 +17,7 @@ on: - '**/*.md' push: branches: + - bugfix-2.0.x - bugfix-2.1.x paths-ignore: - config/** diff --git a/buildroot/bin/use_example_configs b/buildroot/bin/use_example_configs index d6b479e040..48e23b1695 100755 --- a/buildroot/bin/use_example_configs +++ b/buildroot/bin/use_example_configs @@ -1,8 +1,10 @@ #!/usr/bin/env bash +BRANCH=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g') + IFS=: read -r PART1 PART2 <<< "$@" [ -n "${PART2}" ] && { REPO="$PART1" ; RDIR="${PART2// /%20}" ; } \ - || { REPO=bugfix-2.1.x ; RDIR="${PART1// /%20}" ; } + || { REPO=$BRANCH ; RDIR="${PART1// /%20}" ; } EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/$REPO/config/examples" which curl >/dev/null && TOOL='curl -L -s -S -f -o wgot'