diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..50acc130 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false # removes the “blank issue” option \ No newline at end of file diff --git a/.github/workflows/Create-NewReleases.yml b/.github/workflows/Create-NewReleases.yml index cd530c26..ee5e14a4 100644 --- a/.github/workflows/Create-NewReleases.yml +++ b/.github/workflows/Create-NewReleases.yml @@ -85,7 +85,7 @@ jobs: git push origin ${{ steps.nextver.outputs.tag }} - name: Create Release with Automated Release Notes - uses: softprops/action-gh-release@v2.2.2 + uses: softprops/action-gh-release@v2.3.2 with: token: ${{ secrets.GITHUB_TOKEN }} tag_name: ${{ steps.nextver.outputs.tag }} diff --git a/MerlinAU.sh b/MerlinAU.sh index eccfe088..e020ecd1 100644 --- a/MerlinAU.sh +++ b/MerlinAU.sh @@ -4,15 +4,15 @@ # # Original Creation Date: 2023-Oct-01 by @ExtremeFiretop. # Official Co-Author: @Martinski W. - Date: 2023-Nov-01 -# Last Modified: 2025-Jun-08 +# Last Modified: 2025-Jun-17 ################################################################### set -u ## Set version for each Production Release ## -readonly SCRIPT_VERSION=1.4.8 +readonly SCRIPT_VERSION=1.4.9 readonly SCRIPT_NAME="MerlinAU" ## Set to "master" for Production Releases ## -SCRIPT_BRANCH="master" +SCRIPT_BRANCH="dev" ##----------------------------------------## ## Modified by Martinski W. [2024-Jul-03] ## @@ -3033,9 +3033,9 @@ _GetLatestFWUpdateVersionFromRouter_() echo "$newVersionStr" ; return "$retCode" } -##----------------------------------------## -## Modified by Martinski W. [2024-Apr-14] ## -##----------------------------------------## +##------------------------------------------## +## Modified by ExtremeFiretop [2025-Jun-17] ## +##------------------------------------------## _CreateEMailContent_() { if [ $# -eq 0 ] || [ -z "$1" ] ; then return 1 ; fi @@ -3136,35 +3136,34 @@ _CreateEMailContent_() ;; STOP_FW_UPDATE_APPROVAL) emailBodyTitle="WARNING" + high_risk_regex=$(printf '%s\n' "$high_risk_terms" | sed 's/ /[[:space:]]+/g') if "$isEMailFormatHTML" then # Highlight high-risk terms using HTML with a yellow background # - highlighted_changelog_contents="$(echo "$changelog_contents" | sed -E "s/($high_risk_terms)/\1<\/span>/gi")" + highlighted_changelog_contents="$( + printf '%s\n' "$changelog_contents" | + sed -E ":a;N;\$!ba; \ + s/(${high_risk_regex})/\\1<\\/span>/Ig" + )" else # Step 1: Enclose matched terms with unique markers that don't conflict with '>' and '<' - highlighted_changelog_contents="$(echo "$changelog_contents" | sed -E "s/($high_risk_terms)/\[\[UPPER\]\]\1\[\[ENDUPPER\]\]/gi")" - - # Step 2: Modify the awk script with correct marker lengths - highlighted_changelog_contents="$(echo "$highlighted_changelog_contents" | awk ' - BEGIN { - upper_marker = "[[UPPER]]" - endupper_marker = "[[ENDUPPER]]" - upper_marker_length = length(upper_marker) - endupper_marker_length = length(endupper_marker) - } - { - while (match($0, /\[\[UPPER\]\][^\[]*\[\[ENDUPPER\]\]/)) { - prefix = substr($0, 1, RSTART - 1) - match_text_start = RSTART + upper_marker_length - match_text_length = RLENGTH - upper_marker_length - endupper_marker_length - match_text = substr($0, match_text_start, match_text_length) - suffix = substr($0, RSTART + RLENGTH) - match_text_upper = toupper(match_text) - $0 = prefix ">" match_text_upper "<" suffix - } - print - } - ')" + highlighted_changelog_contents="$( + printf '%s\n' "$changelog_contents" | + awk -v regex="$high_risk_regex" ' + BEGIN { IGNORECASE = 1 } + { buf = buf $0 ORS } # slurp into buf + END { + out = "" + while (match(buf, regex)) { + pre = substr(buf, 1, RSTART - 1) + hit = substr(buf, RSTART, RLENGTH) + buf = substr(buf, RSTART + RLENGTH) # delete hit + prefix + out = out pre ">" toupper(hit) "<" # grow output + } + out = out buf # tail with no more matches + printf "%s", out + }' + )" fi { echo "Found high-risk phrases in the changelog file while Auto-Updating to version ${fwNewUpdateVersion} on the ${MODEL_ID} router." diff --git a/README.md b/README.md index 641db1bc..b8919528 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # MerlinAU - AsusWRT-Merlin Firmware Auto Updater -## v1.4.8 -## 2025-Jun-08 +## v1.4.9 +## 2025-Jun-19 ## WebUI: ![image](https://github.com/user-attachments/assets/9c1dff99-9c13-491b-a7fa-aff924d5f02e) @@ -17,43 +17,43 @@ ## SUPPORTED MERLIN MODELS (Multi-image models) - i.e. Any model that uses a .w or a .pkgtb file - - GT-BE98_PRO (Tested) - - GT-AX6000 (Tested) - - GT-AXE16000 (Tested) - - GT-AXE11000 (Tested) - - GT-AX11000_PRO (Tested) - - GT-AX11000 (Tested) - - GT-AC2900 **(Untested)** - - RT-BE92U **(Untested)** - - RT-BE96U **(Untested)** - - RT-BE88U **(Untested)** - - RT-BE86U **(Untested)** - - RT-AX88U_PRO (Tested) - - RT-AX88U (Tested) - - RT-AC86U (Tested) - - RT-AC2900 (Tested) - - RT-AX86U (Tested) - - RT-AX86U_PRO (Tested) - - RT-AX86S (Tested) - - RT-AX68U (Tested) - - RT-AX58U V1 (Tested) - - RT-AX56U (Tested) - - RT-AX3000 V1 (Tested) - - XT12 (Tested) + - GT-BE98_PRO + - GT-AX6000 + - GT-AXE16000 + - GT-AXE11000 + - GT-AX11000_PRO + - GT-AX11000 + - GT-AC2900 + - RT-BE92U + - RT-BE96U + - RT-BE88U + - RT-BE86U + - RT-AX88U_PRO + - RT-AX88U + - RT-AC86U + - RT-AC2900 + - RT-AX86U + - RT-AX86U_PRO + - RT-AX86S + - RT-AX68U + - RT-AX58U V1 + - RT-AX56U + - RT-AX3000 V1 + - XT12 ## SUPPORTED GNUTON MODELS (Multi-image models) - i.e. Any model that uses a .w or a .pkgtb file - - GT-BE98 **Known issues due to missing from manifest2.txt file in Gnuton** - - DSL-AX82U **(Untested)** - - TUF-AX3000 V1 **(Untested)** - - TUF-AX3000 V2 (Tested) - - TUF-AX5400 (Tested) - - RT-AX5400 **(Untested)** - - RT-AX82U V1 (Tested) - - RT-AX82U V2 **(Untested)** - - RT-AX58U V2 **(Untested)** - - RT-AX92U (Tested) - - RT-AX95Q **(Untested)** - - RT-AXE95Q **(Untested)** + - GT-BE98 + - DSL-AX82U + - TUF-AX3000 V1 + - TUF-AX3000 V2 + - TUF-AX5400 + - RT-AX5400 + - RT-AX82U V1 + - RT-AX82U V2 + - RT-AX58U V2 + - RT-AX92U + - RT-AX95Q + - RT-AXE95Q ## UNSUPPORTED MERLIN MODELS: (Single image models) - i.e. Any model that uses a .trx file Blocked due to being single image models. diff --git a/version.txt b/version.txt index b2e46d18..4ea2b1f4 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.4.8 +1.4.9