From 433252aa17d4840f6e0cd14cd5407b929ab82325 Mon Sep 17 00:00:00 2001 From: elseif Date: Wed, 2 Sep 2026 11:24:23 +0800 Subject: [PATCH] modified: .github/workflows/patch_v7.yml modified: setup-routeros.sh --- .github/workflows/patch_v7.yml | 47 +++++++++++++++++++++------------- setup-routeros.sh | 5 ---- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/.github/workflows/patch_v7.yml b/.github/workflows/patch_v7.yml index 3ff1256..0553ef4 100644 --- a/.github/workflows/patch_v7.yml +++ b/.github/workflows/patch_v7.yml @@ -930,18 +930,7 @@ jobs: run: | RELEASE_BODY="$BUILD_DIR/RELEASE_BODY.md" BASE_URL="https://github.com/${{ github.repository }}/releases/download/$VERSION$ARCH_EXT" - cat > "$RELEASE_BODY" << EOF - # RouterOS ${{ env.VERSION }}${{ env.ARCH_EXT }} Release - - **Build Time**: $BUILD_TIME - **Architecture**: $ARCH - **Channel**: $CHANNEL - -
RouterOS - - | Type | File | - |------|------| - EOF + BUILD_TIME_UTC=$(date -u -d "@$BUILD_TIME" "+%Y-%m-%d %H:%M:%S UTC" 2>/dev/null || echo "Invalid timestamp") link_file() { local file="$1" @@ -953,6 +942,17 @@ jobs: fi } + cat > "$RELEASE_BODY" << EOF + **Build Time**: $BUILD_TIME_UTC ($BUILD_TIME) + **Architecture**: $ARCH + **Channel**: $CHANNEL + +
RouterOS + + | Type | File | + |------|------| + EOF + echo "| Main package | $(link_file "$PUBLISH_DIR/routeros-${VERSION}${ARCH_EXT}.npk") |" >> "$RELEASE_BODY" echo "| Extra packages | $(link_file "$PUBLISH_DIR/all_packages-$ARCH-$VERSION.zip") |" >> "$RELEASE_BODY" echo "| ISO Image | $(link_file "$PUBLISH_DIR/mikrotik-${VERSION}${ARCH_EXT}.iso") |" >> "$RELEASE_BODY" @@ -965,23 +965,33 @@ jobs: echo "
Cloud Hosted Router (CHR)" >> "$RELEASE_BODY" echo "" >> "$RELEASE_BODY" - if [ "$ARCH" == "x86" ]; then - echo "| Format | UEFI | Legacy BIOS |" >> "$RELEASE_BODY" + echo "| Platform | UEFI | Legacy BIOS |" >> "$RELEASE_BODY" echo "|--------|------|-------------|" >> "$RELEASE_BODY" else - echo "| Format | UEFI |" >> "$RELEASE_BODY" + echo "| Platform | UEFI |" >> "$RELEASE_BODY" echo "|--------|------|" >> "$RELEASE_BODY" fi formats=("img" "ova" "qcow2" "vdi" "vhd" "vhdx" "vmdk") + declare -A FORMAT_PLATFORM=( + ["img"]="Raw disk image" + ["ova"]="Open Virtual Appliance" + ["qcow2"]="QEMU/KVM" + ["vdi"]="VirtualBox" + ["vhd"]="Hyper-V (legacy)" + ["vhdx"]="Hyper-V" + ["vmdk"]="VMware" + ) + for fmt in "${formats[@]}"; do + platform="${FORMAT_PLATFORM[$fmt]}" uefi_link=$(link_file "$PUBLISH_DIR/chr-$VERSION$ARCH_EXT.$fmt.zip") if [ "$ARCH" == "x86" ]; then legacy_link=$(link_file "$PUBLISH_DIR/chr-$VERSION$ARCH_EXT-legacy-bios.$fmt.zip") - echo "| $fmt | $uefi_link | $legacy_link |" >> "$RELEASE_BODY" + echo "| $platform | $uefi_link | $legacy_link |" >> "$RELEASE_BODY" else - echo "| $fmt | $uefi_link |" >> "$RELEASE_BODY" + echo "| $platform | $uefi_link |" >> "$RELEASE_BODY" fi done echo "
" >> "$RELEASE_BODY" @@ -994,7 +1004,8 @@ jobs: cat "$PUBLISH_DIR/CHANGELOG" >> "$RELEASE_BODY" echo "" >> "$RELEASE_BODY" echo "
" >> "$RELEASE_BODY" - echo "✅ Release body generated at $RELEASE_BODY" + echo "📄 Release body content:" + cat "$RELEASE_BODY" - name: Create Release tag ${{ env.VERSION }}${{ env.ARCH_EXT }} if: needs.Prepare_Patch.outputs.RELEASE == 'true' diff --git a/setup-routeros.sh b/setup-routeros.sh index 880df80..a546b8f 100644 --- a/setup-routeros.sh +++ b/setup-routeros.sh @@ -1,9 +1,4 @@ #!/bin/bash -# Requires bash >= 4: mapfile, associative arrays (declare -A). -if (( BASH_VERSINFO[0] < 4 )); then - echo "ERROR: this installer requires bash >= 4 (found $BASH_VERSION)." >&2 - exit 1 -fi BACKTITLE="MikroTik RouterOS LiveCD Installer" TITLE="RouterOS Installation Wizard"