Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: Windows runtime fixes for v3.9.2 #163

Merged
merged 3 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: Bundle packages

on:
pull_request:
branches: [ main ]
branches:
- main
- hotfix/*
push:
branches: [ main ]
branches:
- main
- hotfix/*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -13,7 +17,7 @@ concurrency:
env:
DOTNET_INSTALL_DIR: ${{ github.workspace }}/.dotnet
DOTNET_VERSION: '8.0.x'
IS_PRE_RELEASE: ${{ !contains(github.ref, 'main') || contains(github.event.head_commit.message, '[prerelease]') }}
IS_PRE_RELEASE: ${{ !contains(github.ref, 'main') || !contains(github.ref, 'hotfix/') || contains(github.event.head_commit.message, '[prerelease]') }}

jobs:
LinuxBuild:
Expand Down Expand Up @@ -108,7 +112,7 @@ jobs:
tag: 'v${{ env.PACKAGES_VERSION }} --force'

- name: Push packages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.event.pull_request.merged == true && (github.ref == 'refs/heads/main' || contains(github.ref, 'hotfix/')) }}
run: |
make -f push-packages-makefile PRERELEASE=${{ env.IS_PRE_RELEASE }} INCLUDE_CORE=1 \
BUILD_NUMBER_TAIL=${{ github.run_number }} API_KEY_GITHUB=${{ secrets.API_KEY_GITHUB }} API_KEY_NUGET=${{ secrets.API_KEY_NUGET }}
7 changes: 5 additions & 2 deletions win/partials.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -338,10 +338,13 @@ function Build-CsharpBindings {
}

function Convert-ToUnixPath($path) {
$unixPath = $path -replace "\\", "/"
$unixPath = $path -replace "\\", "/"
if ($unixPath -match "^([a-zA-Z]):") {
$unixPath = $unixPath -replace "^([a-zA-Z]):", { "/$($matches[1].ToLower())" }
}
}
if ($unixPath -match "\s") {
$unixPath = "`"$unixPath`""
}
return $unixPath
}

Expand Down
4 changes: 4 additions & 0 deletions win/test-makefile.vc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ test-restore:
-cd $(MAKEDIR)

test-update:
-cd $(TEST_TARGET_AZ)
-dotnet add package MaxRev.Gdal.Core -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)
-cd $(TEST_DIR_APP)
-dotnet add package MaxRev.Gdal.Core -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)
-cd $(TEST_DIR)
-dotnet add package MaxRev.Gdal.WindowsRuntime.Minimal -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)
-dotnet add package MaxRev.Gdal.Core -v "$(GDAL_VERSION).$(PACKAGE_BUILD_NUMBER)" -s $(NUGET_)
Expand Down
2 changes: 1 addition & 1 deletion win/test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ try {
$env:GDAL_PACKAGE_VERSION = "$env:GDAL_VERSION.$buildNumber"
Write-BuildStep "Executing tests for $env:GDAL_PACKAGE_VERSION"
$essentialOnlyVal = $essentialOnly ? "1" : "0"
exec { nmake -f "$PSScriptRoot/test-makefile.vc" $preReleaseArg GDAL_VERSION=$env:GDAL_VERSION PACKAGE_BUILD_NUMBER=$buildNumber ESSENTIAL_ONLY=$essentialOnlyVal }
nmake -f "$PSScriptRoot/test-makefile.vc" $preReleaseArg GDAL_VERSION=$env:GDAL_VERSION PACKAGE_BUILD_NUMBER=$buildNumber ESSENTIAL_ONLY=$essentialOnlyVal
}
finally {
Pop-Location -StackName "gdal.netcore|root"
Expand Down
Loading