|
55 | 55 | - uses: actions/checkout@v4
|
56 | 56 | - name: Get WipperSnapper version
|
57 | 57 | run: |
|
58 |
| - git fetch --prune --unshallow --tags |
59 |
| - git describe --dirty --tags |
60 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 58 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 59 | + git fetch --prune --unshallow --all --tags |
| 60 | + WS_VERSION="unknown" |
| 61 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 62 | + WS_VERSION=$(git describe --dirty --tags) |
| 63 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 64 | + else |
| 65 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 66 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 67 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 68 | + WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 69 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 70 | + fi |
| 71 | + echo "WS_VERSION: $WS_VERSION" |
61 | 72 | - uses: actions/checkout@v4
|
62 | 73 | with:
|
63 | 74 | repository: adafruit/ci-arduino
|
@@ -272,9 +283,17 @@ jobs:
|
272 | 283 | - uses: actions/checkout@v4
|
273 | 284 | - name: Get WipperSnapper version
|
274 | 285 | run: |
|
275 |
| - git fetch --prune --unshallow --tags |
276 |
| - git describe --dirty --tags |
277 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 286 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 287 | + git fetch --prune --unshallow --all --tags |
| 288 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 289 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 290 | + else |
| 291 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 292 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 293 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 294 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 295 | + fi |
| 296 | + echo "WS_VERSION: $WS_VERSION" |
278 | 297 | - uses: actions/checkout@v4
|
279 | 298 | with:
|
280 | 299 | repository: adafruit/ci-arduino
|
@@ -388,9 +407,17 @@ jobs:
|
388 | 407 | - uses: actions/checkout@v4
|
389 | 408 | - name: Get WipperSnapper version
|
390 | 409 | run: |
|
391 |
| - git fetch --prune --unshallow --tags |
392 |
| - git describe --dirty --tags |
393 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 410 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 411 | + git fetch --prune --unshallow --all --tags |
| 412 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 413 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 414 | + else |
| 415 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 416 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 417 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 418 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 419 | + fi |
| 420 | + echo "WS_VERSION: $WS_VERSION" |
394 | 421 | - uses: actions/checkout@v4
|
395 | 422 | with:
|
396 | 423 | repository: adafruit/ci-arduino
|
@@ -526,9 +553,17 @@ jobs:
|
526 | 553 | - uses: actions/checkout@v4
|
527 | 554 | - name: Get WipperSnapper version
|
528 | 555 | run: |
|
529 |
| - git fetch --prune --unshallow --tags |
530 |
| - git describe --dirty --tags |
531 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 556 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 557 | + git fetch --prune --unshallow --all --tags |
| 558 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 559 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 560 | + else |
| 561 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 562 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 563 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 564 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 565 | + fi |
| 566 | + echo "WS_VERSION: $WS_VERSION" |
532 | 567 | - uses: actions/checkout@v4
|
533 | 568 | with:
|
534 | 569 | repository: adafruit/ci-arduino
|
@@ -608,9 +643,17 @@ jobs:
|
608 | 643 | - uses: actions/checkout@v4
|
609 | 644 | - name: Get WipperSnapper version
|
610 | 645 | run: |
|
611 |
| - git fetch --prune --unshallow --tags |
612 |
| - git describe --dirty --tags |
613 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 646 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 647 | + git fetch --prune --unshallow --all --tags |
| 648 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 649 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 650 | + else |
| 651 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 652 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 653 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 654 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 655 | + fi |
| 656 | + echo "WS_VERSION: $WS_VERSION" |
614 | 657 | - uses: actions/checkout@v4
|
615 | 658 | with:
|
616 | 659 | repository: adafruit/ci-arduino
|
@@ -687,9 +730,17 @@ jobs:
|
687 | 730 | - uses: actions/checkout@v4
|
688 | 731 | - name: Get WipperSnapper version
|
689 | 732 | run: |
|
690 |
| - git fetch --prune --unshallow --tags |
691 |
| - git describe --dirty --tags |
692 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 733 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 734 | + git fetch --prune --unshallow --all --tags |
| 735 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 736 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 737 | + else |
| 738 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 739 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 740 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 741 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 742 | + fi |
| 743 | + echo "WS_VERSION: $WS_VERSION" |
693 | 744 | - uses: actions/checkout@v4
|
694 | 745 | with:
|
695 | 746 | repository: adafruit/ci-arduino
|
@@ -784,9 +835,17 @@ jobs:
|
784 | 835 | - uses: actions/checkout@v4
|
785 | 836 | - name: Get WipperSnapper version
|
786 | 837 | run: |
|
787 |
| - git fetch --prune --unshallow --tags |
788 |
| - git describe --dirty --tags |
789 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 838 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 839 | + git fetch --prune --unshallow --all --tags |
| 840 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 841 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 842 | + else |
| 843 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 844 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 845 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 846 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 847 | + fi |
| 848 | + echo "WS_VERSION: $WS_VERSION" |
790 | 849 | - uses: actions/checkout@v4
|
791 | 850 | with:
|
792 | 851 | repository: adafruit/ci-arduino
|
@@ -888,9 +947,17 @@ jobs:
|
888 | 947 | - uses: actions/checkout@v4
|
889 | 948 | - name: Get WipperSnapper version
|
890 | 949 | run: |
|
891 |
| - git fetch --prune --unshallow --tags |
892 |
| - git describe --dirty --tags |
893 |
| - echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 950 | + git remote add adafruit https://github.com/adafruit/Adafruit_Wippersnapper_Arduino.git || true |
| 951 | + git fetch --prune --unshallow --all --tags |
| 952 | + if git describe --dirty --tags >/dev/null 2>&1; then |
| 953 | + echo >>$GITHUB_ENV WS_VERSION=$(git describe --dirty --tags) |
| 954 | + else |
| 955 | + # Fallback for forks: 1.0.0-{owner}-{short-sha} |
| 956 | + REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f1) |
| 957 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 958 | + echo >>$GITHUB_ENV WS_VERSION="1.0.0-${REPO_OWNER}-${SHORT_SHA}" |
| 959 | + fi |
| 960 | + echo "WS_VERSION: $WS_VERSION" |
894 | 961 | - uses: actions/checkout@v4
|
895 | 962 | with:
|
896 | 963 | repository: adafruit/ci-arduino
|
|
0 commit comments