浏览代码

👔 Update Marlin actions for 2.1.x

Scott Lahteine 2 年前
父节点
当前提交
41a9dea149

+ 21
- 1
.github/workflows/bump-date.yml 查看文件

@@ -23,7 +23,27 @@ jobs:
23 23
       with:
24 24
         ref: bugfix-2.1.x
25 25
 
26
-    - name: Bump Distribution Date
26
+    - name: Bump Date (bugfix-2.0.x)
27
+      run: |
28
+        # Inline Bump Script
29
+        if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
30
+          DIST=$( date +"%Y-%m-%d" )
31
+          eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/src/inc/Version.h" && \
32
+          eval "sed -E -i 's/(#define +STRING_DISTRIBUTION_DATE) .*$/\1 \"$DIST\"/g' Marlin/Version.h" && \
33
+          git config user.name "${GITHUB_ACTOR}" && \
34
+          git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" && \
35
+          git add . && \
36
+          git commit -m "[cron] Bump distribution date ($DIST)" && \
37
+          git push
38
+        fi
39
+        exit 0
40
+
41
+    - name: Check out bugfix-2.1.x
42
+      uses: actions/checkout@v2
43
+      with:
44
+        ref: bugfix-2.1.x
45
+
46
+    - name: Bump Date (bugfix-2.1.x)
27 47
       run: |
28 48
         # Inline Bump Script
29 49
         if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then

+ 3
- 2
.github/workflows/check-pr.yml 查看文件

@@ -12,6 +12,7 @@ on:
12 12
     - 1.0.x
13 13
     - 1.1.x
14 14
     - 2.0.x
15
+    - 2.1.x
15 16
 
16 17
 jobs:
17 18
   bad_target:
@@ -26,8 +27,8 @@ jobs:
26 27
         comment: >
27 28
           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.
28 29
 
29
-          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.
30
+          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.
30 31
 
31
-          It may help to set your fork's default branch to `bugfix-2.1.x`.
32
+          It may help to set your fork's default branch to `bugfix-2.0.x`.
32 33
 
33 34
           See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

+ 2
- 0
.github/workflows/test-builds.yml 查看文件

@@ -8,6 +8,7 @@ name: CI
8 8
 on:
9 9
   pull_request:
10 10
     branches:
11
+    - bugfix-2.0.x
11 12
     - bugfix-2.1.x
12 13
     paths-ignore:
13 14
     - config/**
@@ -16,6 +17,7 @@ on:
16 17
     - '**/*.md'
17 18
   push:
18 19
     branches:
20
+    - bugfix-2.0.x
19 21
     - bugfix-2.1.x
20 22
     paths-ignore:
21 23
     - config/**

+ 3
- 1
buildroot/bin/use_example_configs 查看文件

@@ -1,8 +1,10 @@
1 1
 #!/usr/bin/env bash
2 2
 
3
+BRANCH=$(git branch 2>/dev/null | grep ^* | sed 's/\* //g')
4
+
3 5
 IFS=: read -r PART1 PART2 <<< "$@"
4 6
 [ -n "${PART2}" ] && { REPO="$PART1" ; RDIR="${PART2// /%20}" ; } \
5
-                  || { REPO=bugfix-2.1.x   ; RDIR="${PART1// /%20}" ; }
7
+                  || { REPO=$BRANCH   ; RDIR="${PART1// /%20}" ; }
6 8
 EXAMPLES="https://raw.githubusercontent.com/MarlinFirmware/Configurations/$REPO/config/examples"
7 9
 
8 10
 which curl >/dev/null && TOOL='curl -L -s -S -f -o wgot'

正在加载...
取消
保存