diff --git a/.github/workflows/building-pkg.yml b/.github/workflows/building-pkg.yml index 754bac5..0839e09 100644 --- a/.github/workflows/building-pkg.yml +++ b/.github/workflows/building-pkg.yml @@ -123,10 +123,15 @@ jobs: sudo apt update sudo apt install sshpass -y mkdir -p ~/.ssh/ + echo '[I] (Push) Scanning host key...' ssh-keyscan -p $UPORT -H $UHOST >> ~/.ssh/known_hosts tarName=$(ls | grep '^arch-.*\.tar$' | head -n 1) + echo "[I] (Push) Uploading $tarName..." sshpass -p "$UPASSWD" rsync -e "ssh -p $UPORT" $tarName $UUSERS@$UHOST:$UPATH - sshpass -p "$UPASSWD" ssh $UUSERS@$UHOST -p $UPORT $UPROGRAM_ARCH ${{ matrix.arch }} $UPATH/$tarName > /dev/null + # 不要丢弃输出,否则服务器端脚本出错时看不到原因 + # Keep the output, otherwise errors from the remote script are invisible. + echo '[I] (Push) Updating GXDE Arch repo database...' + sshpass -p "$UPASSWD" ssh $UUSERS@$UHOST -p $UPORT $UPROGRAM_ARCH ${{ matrix.arch }} $UPATH/$tarName - name: Create Release uses: softprops/action-gh-release@v1 diff --git a/tools/arch-repo-update.sh b/tools/arch-repo-update.sh index 44c2702..26d6def 100644 --- a/tools/arch-repo-update.sh +++ b/tools/arch-repo-update.sh @@ -59,11 +59,11 @@ echo '╚═╝ ╚═╝╚═╝ ╚═════╝╚═╝ ╚ case $arch in x86_64|aarch64) ;; - *) echo "Unsupported arch: $arch"; exit 1 ;; + *) echo "Unsupported arch: $arch" >&2; exit 1 ;; esac if [[ ! -f $tar_path ]]; then - echo "$tar_path not found" + echo "$tar_path not found" >&2 exit 1 fi @@ -89,7 +89,7 @@ for pkg in $tmpDir/*.pkg.tar.*; do done if [[ ${#newPackages[@]} == 0 ]]; then - echo "No package in $tar_path" + echo "No package in $tar_path" >&2 exit 1 fi