Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Improvements to Changelog Verification #301

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
#
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
# Last Modified: 2024-Sep-02
# Last Modified: 2024-Sep-07
###################################################################
set -u

## Set version for each Production Release ##
readonly SCRIPT_VERSION=1.3.0
readonly SCRIPT_VERSION=1.3.1
readonly SCRIPT_NAME="MerlinAU"
## Set to "master" for Production Releases ##
SCRIPT_BRANCH="dev"
Expand Down Expand Up @@ -1502,7 +1502,7 @@ _CreateEMailContent_()
if [ $# -eq 0 ] || [ -z "$1" ] ; then return 1 ; fi
local fwInstalledVersion fwNewUpdateVersion
local savedInstalledVersion savedNewUpdateVersion
local subjectStr emailBodyTitle=""
local subjectStr emailBodyTitle="" release_version

rm -f "$tempEMailContent" "$tempEMailBodyMsg"

Expand All @@ -1511,7 +1511,12 @@ _CreateEMailContent_()
else subjectStr="F/W Update Status for $MODEL_ID"
fi
fwInstalledVersion="$(_GetCurrentFWInstalledLongVersion_)"
fwNewUpdateVersion="$(_GetLatestFWUpdateVersionFromRouter_ 1)"
if ! "$offlineUpdateTrigger"
then
fwNewUpdateVersion="$(_GetLatestFWUpdateVersionFromRouter_ 1)"
else
fwNewUpdateVersion="$(Get_Custom_Setting "FW_New_Update_Notification_Vers")"
fi

# Remove "_rog" or "_tuf" suffix to avoid version comparison failures #
fwInstalledVersion="$(echo "$fwInstalledVersion" | sed 's/_\(rog\|tuf\)$//')"
Expand Down Expand Up @@ -5230,7 +5235,7 @@ _GetOfflineFirmwareVersion_()
}

##------------------------------------------##
## Modified by ExtremeFiretop [2024-Aug-06] ##
## Modified by ExtremeFiretop [2024-Sep-07] ##
##------------------------------------------##
_SelectOfflineUpdateFile_()
{
Expand Down Expand Up @@ -5328,6 +5333,8 @@ _SelectOfflineUpdateFile_()
printf "\nRelease version: ${GRNct}${release_version}${NOct}\n"
printf "\n---------------------------------------------------\n"
_WaitForEnterKey_
Update_Custom_Settings FW_New_Update_Notification_Vers "$release_version"
Update_Custom_Settings FW_New_Update_Notification_Date "$(date +"$FW_UpdateNotificationDateFormat")"
clear
return 0
else
Expand Down Expand Up @@ -6063,7 +6070,7 @@ Please manually update to version $MinSupportedFirmwareVers or higher to use thi
_SendEMailNotification_ START_FW_UPDATE_STATUS

##------------------------------------------##
## Modified by ExtremeFiretop [2024-Jun-30] ##
## Modified by ExtremeFiretop [2024-Sep-07] ##
##------------------------------------------##

curl_response="$(curl -k "${routerURLstr}/login.cgi" \
Expand All @@ -6082,10 +6089,8 @@ Please manually update to version $MinSupportedFirmwareVers or higher to use thi

if echo "$curl_response" | grep -Eq 'url=index\.asp|url=GameDashboard\.asp'
then
if ! "$offlineUpdateTrigger"
then
_SendEMailNotification_ POST_REBOOT_FW_UPDATE_SETUP
fi

_SendEMailNotification_ POST_REBOOT_FW_UPDATE_SETUP

if [ -f /opt/bin/diversion ]
then
Expand Down