From fe94b5e7a12ff24e06892ddde3ad6c3831e8bcbf Mon Sep 17 00:00:00 2001 From: ellizio Date: Fri, 5 Apr 2024 21:59:45 +0300 Subject: [PATCH 1/5] some fixes --- .github/workflows/CI.yml | 2 +- .../terminal/executors/BatchCommandLineExecutor.kt | 2 +- .../odatacliui/terminal/executors/CommandLineExecutor.kt | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 6b89533..51fd868 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -28,7 +28,7 @@ jobs: - uses: actions/upload-artifact@v3 if: github.ref_name == 'master' || github.ref_name == 'dev' with: - name: $odata-cli-ui.${{ steps.fix_branch_name.outputs.value }}-${{ github.run_number }} + name: odata-cli-ui.${{ steps.fix_branch_name.outputs.value }}-${{ github.run_number }} path: output Test: runs-on: ubuntu-latest diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/BatchCommandLineExecutor.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/BatchCommandLineExecutor.kt index 05b64e7..cedbf4b 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/BatchCommandLineExecutor.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/BatchCommandLineExecutor.kt @@ -14,7 +14,7 @@ class BatchCommandLineExecutor( private val batchCommandLine: BatchCommandLine, private val consoleView: ConsoleView) { - private val newLine = System.lineSeparator() + System.lineSeparator(); + private val newLine = System.lineSeparator() + System.lineSeparator() fun execute() { val listener = object : ProcessAdapter() { diff --git a/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/CommandLineExecutor.kt b/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/CommandLineExecutor.kt index 54243fc..1db8db4 100644 --- a/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/CommandLineExecutor.kt +++ b/src/rider/main/kotlin/ru/ellizio/odatacliui/terminal/executors/CommandLineExecutor.kt @@ -14,10 +14,10 @@ class CommandLineExecutor( private val commandLine: GeneralCommandLine, private val consoleView: ConsoleView) { - private val newLine = System.lineSeparator() + System.lineSeparator(); + private val newLine = System.lineSeparator() + System.lineSeparator() fun execute(): Boolean { - var hasError = false; + var hasError = false val listener = object : ProcessAdapter() { override fun onTextAvailable(event: ProcessEvent, outputType: Key<*>) { @@ -30,7 +30,7 @@ class CommandLineExecutor( override fun processTerminated(event: ProcessEvent) { if (event.exitCode != 0) - hasError = true; + hasError = true super.processTerminated(event) } From a33db04985a45d6328ca7a230fa21bc9b71bb5c3 Mon Sep 17 00:00:00 2001 From: ellizio Date: Fri, 5 Apr 2024 22:20:12 +0300 Subject: [PATCH 2/5] release pipeline --- .github/workflows/Deploy.yml | 21 --------------------- .github/workflows/Release.yml | 32 ++++++++++++++++++++++++++++++++ README.md | 1 + 3 files changed, 33 insertions(+), 21 deletions(-) delete mode 100644 .github/workflows/Deploy.yml create mode 100644 .github/workflows/Release.yml diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml deleted file mode 100644 index b6f3ce3..0000000 --- a/.github/workflows/Deploy.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Deploy - -on: - push: - tags: - - '*.*.*' - -jobs: - Publish: - runs-on: windows-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - run: ./gradlew :publishPlugin -PBuildConfiguration="Release" -PPluginVersion="${{ github.ref_name }}" -PPublishToken="${{ env.PUBLISH_TOKEN }}" - env: - PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} - - uses: actions/upload-artifact@v3 - if: always() - name: ${{ github.event.repository.name }}.${{ github.ref_name }} - path: output diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml new file mode 100644 index 0000000..7de9f48 --- /dev/null +++ b/.github/workflows/Release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + push: + tags: + - '*.*.*-*.*' + +jobs: + Publish: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + - run: ./gradlew :rdgen + - run: ./gradlew :buildPlugin -PBuildConfiguration=Release + - run: ./gradlew :signPlugin + env: + CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} + PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} + PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }} + - uses: mad9000/actions-find-and-replace-string@5 + id: fix_branch_name + with: + source: ${{ github.ref_name }} + find: 'release/' + replace: '-' + - uses: actions/upload-artifact@v3 + if: always() + with: + name: odata-cli-ui.${{ steps.fix_branch_name.outputs.value }} + path: output diff --git a/README.md b/README.md index 8c76ba4..401d57c 100644 --- a/README.md +++ b/README.md @@ -27,4 +27,5 @@ TODO ## Additional References +- [Changelog](https://github.com/ellizio/rider--plugin--odata-cli-ui/blob/master/CHANGELOG.md) - [OData CLI](https://learn.microsoft.com/en-us/odata/odatacli/getting-started) \ No newline at end of file From 640c9105ecb8870c789011ebc7c45fee13198b23 Mon Sep 17 00:00:00 2001 From: ellizio Date: Fri, 5 Apr 2024 22:27:29 +0300 Subject: [PATCH 3/5] fix --- .github/workflows/Release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 7de9f48..e88fbe0 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -3,10 +3,10 @@ name: Release on: push: tags: - - '*.*.*-*.*' + - 'v*.*.*-*.*' jobs: - Publish: + Release: runs-on: windows-latest steps: - uses: actions/checkout@v2 From 8091744561632f48352d11973e2aca755dacd8cc Mon Sep 17 00:00:00 2001 From: ellizio Date: Fri, 5 Apr 2024 22:35:21 +0300 Subject: [PATCH 4/5] fix --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index e88fbe0..2cbaa75 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -24,7 +24,7 @@ jobs: with: source: ${{ github.ref_name }} find: 'release/' - replace: '-' + replace: '' - uses: actions/upload-artifact@v3 if: always() with: From d299755a32657514cde69c3467e2b4bddf0c6d33 Mon Sep 17 00:00:00 2001 From: ellizio Date: Fri, 5 Apr 2024 22:48:17 +0300 Subject: [PATCH 5/5] fix --- .github/workflows/Release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index 2cbaa75..10e2ab7 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -14,7 +14,7 @@ jobs: submodules: recursive - run: ./gradlew :rdgen - run: ./gradlew :buildPlugin -PBuildConfiguration=Release - - run: ./gradlew :signPlugin + - run: ./gradlew :signPlugin -PBuildConfiguration=Release env: CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }} PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}