This is an automated email from the ASF dual-hosted git repository.

rzo1 pushed a commit to branch OPENNLP-1688
in repository https://gitbox.apache.org/repos/asf/opennlp.git


The following commit(s) were added to refs/heads/OPENNLP-1688 by this push:
     new f7d46e1f x
f7d46e1f is described below

commit f7d46e1f8774f4e7ad3a2d6f215611914986c3a9
Author: Richard Zowalla <[email protected]>
AuthorDate: Fri Jan 17 13:10:40 2025 +0100

    x
---
 .github/workflows/shell-tests.yml | 45 ++++++++++++++++++++++-----------------
 1 file changed, 25 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/shell-tests.yml 
b/.github/workflows/shell-tests.yml
index fa4741ec..b7b10ac1 100644
--- a/.github/workflows/shell-tests.yml
+++ b/.github/workflows/shell-tests.yml
@@ -149,26 +149,31 @@ jobs:
 
       - name: Find and Extract OpenNLP Distribution
         run: |
-          # Find the first non-src .tar.gz file in the target directory
-          $TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter 
"*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
-
-          # Ensure we found a file
-          if (-not $TAR_FILE) {
-            Write-Error "Error: No matching tar.gz file found in 
opennlp-distr/target"
-            exit 1
-          }
-
-          # Extract the tar.gz file to the user profile directory
-          $Destination = "$env:USERPROFILE"
-          tar -xzf $TAR_FILE.FullName -C $Destination
-
-          # Get the directory name of the extracted content (excluding the tar 
path)
-          $EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 
1).Split('/')[0]
-
-          # Set OPENNLP_HOME dynamically in the environment
-          Write-Host "OPENNLP_HOME=$env:USERPROFILE\$EXTRACTED_DIR"  # 
Debugging
-          echo "OPENNLP_HOME=$env:USERPROFILE\$EXTRACTED_DIR" >> $GITHUB_ENV
-          echo "$env:USERPROFILE\$EXTRACTED_DIR\bin" >> $GITHUB_PATH
+      - name: Find and Extract OpenNLP Distribution
+        run: |
+        # Find the first non-src .tar.gz file in the target directory
+        $TAR_FILE = Get-ChildItem -Path opennlp-distr/target -Filter 
"*.tar.gz" | Where-Object { $_.Name -notlike "*-src*" } | Select-Object -First 1
+    
+        # Ensure we found a file
+        if (-not $TAR_FILE) {
+          Write-Error "Error: No matching tar.gz file found in 
opennlp-distr/target"
+          exit 1
+        }
+
+        # Extract the tar.gz file to the user profile directory
+        $Destination = "$env:USERPROFILE"
+        tar -xzf $TAR_FILE.FullName -C $Destination
+    
+        # Get the directory name of the extracted content (excluding the tar 
path)
+        $EXTRACTED_DIR = (tar -tf $TAR_FILE.FullName | Select-Object -First 
1).Split('/')[0]
+    
+        # Set OPENNLP_HOME dynamically in the environment
+        $OPENNLP_HOME_PATH = "$env:USERPROFILE\$EXTRACTED_DIR"
+        Write-Host "OPENNLP_HOME=$OPENNLP_HOME_PATH"  # Debugging
+    
+        # Set the environment variable for future steps
+        echo "OPENNLP_HOME=$OPENNLP_HOME_PATH" >> $GITHUB_ENV
+        echo "$OPENNLP_HOME_PATH\bin" >> $GITHUB_PATH
 
       - name: Verify Extraction
         run: |

Reply via email to