Browse Source

👔 Update Marlin actions for 2.1.x

Scott Lahteine 2 years ago
parent
commit
41a9dea149

+ 21
- 1
.github/workflows/bump-date.yml View File

23
       with:
23
       with:
24
         ref: bugfix-2.1.x
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
       run: |
47
       run: |
28
         # Inline Bump Script
48
         # Inline Bump Script
29
         if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then
49
         if [[ ! "$( git log -1 --pretty=%B )" =~ ^\[cron\] ]]; then

+ 3
- 2
.github/workflows/check-pr.yml View File

12
     - 1.0.x
12
     - 1.0.x
13
     - 1.1.x
13
     - 1.1.x
14
     - 2.0.x
14
     - 2.0.x
15
+    - 2.1.x
15
 
16
 
16
 jobs:
17
 jobs:
17
   bad_target:
18
   bad_target:
26
         comment: >
27
         comment: >
27
           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
           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
           See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.
34
           See [this page](http://marlinfw.org/docs/development/getting_started_pull_requests.html) for full instructions.

+ 2
- 0
.github/workflows/test-builds.yml View File

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

+ 3
- 1
buildroot/bin/use_example_configs View File

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

Loading…
Cancel
Save