From 00eaf8a04ca1ed84ddd854c0546376106ad90ad3 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 17 Jul 2020 23:44:58 -0400 Subject: [PATCH] action to upload server binary --- .github/workflows/build-rusEFI-console.yaml | 8 ++++++-- .github/workflows/build-tsplugin-body.yaml | 2 +- java_console/upload_server.sh | 11 +++++++++++ java_tools/ts_plugin/{upload.sh => upload_plugin.sh} | 0 4 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 java_console/upload_server.sh rename java_tools/ts_plugin/{upload.sh => upload_plugin.sh} (100%) mode change 100755 => 100644 diff --git a/.github/workflows/build-rusEFI-console.yaml b/.github/workflows/build-rusEFI-console.yaml index 2161b3499c..1e2f5f76e4 100644 --- a/.github/workflows/build-rusEFI-console.yaml +++ b/.github/workflows/build-rusEFI-console.yaml @@ -19,11 +19,15 @@ jobs: - name: Build console working-directory: ./java_console - run: ant + run: ant server_jar - - name: Upload console junit results + - name: Attach console junit results if: always() uses: actions/upload-artifact@v2 with: name: console junit path: ./java_console/build/*.txt + + - name: Upload plugin body + working-directory: ./java_console + run: ./upload_server.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} diff --git a/.github/workflows/build-tsplugin-body.yaml b/.github/workflows/build-tsplugin-body.yaml index 125b765135..2dc5c9964f 100644 --- a/.github/workflows/build-tsplugin-body.yaml +++ b/.github/workflows/build-tsplugin-body.yaml @@ -26,4 +26,4 @@ jobs: - name: Upload plugin body working-directory: ./java_tools/ts_plugin - run: ./upload.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} + run: ./upload_plugin.sh ${{ secrets.RUSEFI_BUILD_FTP_USER }} ${{ secrets.RUSEFI_BUILD_FTP_PASS }} ${{ secrets.RUSEFI_FTP_SERVER }} diff --git a/java_console/upload_server.sh b/java_console/upload_server.sh new file mode 100644 index 0000000000..17bdaf3702 --- /dev/null +++ b/java_console/upload_server.sh @@ -0,0 +1,11 @@ +#!/bin/bash + + +if [ ! "$1" ] || [ ! "$2" ] || [ ! "$3" ]; then + echo "No Secrets" + exit 0 +fi + +echo -e "\nUploading plugin body" + +ncftpput -m -R -v -u "$1" -p "$2" "$3" autoupdate ../java_console_binary/rusefi_server.jar diff --git a/java_tools/ts_plugin/upload.sh b/java_tools/ts_plugin/upload_plugin.sh old mode 100755 new mode 100644 similarity index 100% rename from java_tools/ts_plugin/upload.sh rename to java_tools/ts_plugin/upload_plugin.sh