Skip to content

Commit

Permalink
relative path calculation part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
pirog committed Nov 19, 2024
1 parent 303f7ac commit 21056fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,6 @@ jobs:
term: xterm
strategy:
fail-fast: false
matrix:
include:

- os: windows-2022
file: dist/@lando/code-sign-action.exe
certificate-data: KEYLOCKER_CLIENT_CERT
certificate-password: KEYLOCKER_CLIENT_CERT_PASSWORD
node-version: '20'
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -164,7 +156,7 @@ jobs:
- name: Codesign
uses: ./
with:
file: dist/@lando/code-sign-action.exe
file: dist/@lando/code-sign-action
certificate-data: ${{ secrets.APPLE_CERT_DATA }}
certificate-password: ${{ secrets.APPLE_CERT_PASSWORD }}
apple-notary-user: ${{ secrets.APPLE_NOTARY_USER }}
Expand Down
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,17 @@ runs:
[string]$ToPath
)
# Ensure paths are fully qualified
# Create URI objects
$fromUri = New-Object System.Uri -ArgumentList (Resolve-Path -LiteralPath $FromPath).Path
$toUri = New-Object System.Uri -ArgumentList (Resolve-Path -LiteralPath $ToPath).Path
# Compute the relative path
$relativeUri = $fromUri.MakeRelativeUri($toUri)
$relativePath = [System.Uri]::UnescapeDataString($relativeUri.ToString())
# Convert URI-style paths to file system style paths
if ($toUri.IsFile && $relativePath -notlike "*:*") {
$relativePath = $relativePath -replace '/', '\'
# Convert URI-style paths to file system style paths (Windows-specific)
if ($relativePath -notlike "*:*") {
$relativePath = $relativePath -replace '/', '\'
}
return $relativePath
Expand Down

0 comments on commit 21056fe

Please sign in to comment.