Skip to content

Commit

Permalink
Merge pull request #37 from egvijayanand/working
Browse files Browse the repository at this point in the history
Updated version of VijayAnand.MauiToolkit.* packages
  • Loading branch information
egvijayanand authored Jun 18, 2022
2 parents 3f75d36 + 8c2bff8 commit 6d438e0
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-maui-toolkit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build-weekly-xamarin-blazor"
# This workflow contains a single job called "build-maui-toolkit"
build-maui-toolkit:
# The type of runner that the job will run on
runs-on: windows-latest
Expand All @@ -37,11 +37,11 @@ jobs:

# Install Maui workload
- name: Install Maui workload
run: dotnet workload install maui --from-rollback-file https://aka.ms/dotnet/maui/${{ secrets.DOTNET_VERSION }}.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json
run: dotnet workload install maui

# Install WebAssembly workload
- name: Install WebAssembly workload
run: dotnet workload install wasm-tools --from-rollback-file https://aka.ms/dotnet/maui/${{ secrets.DOTNET_VERSION }}.json --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json
run: dotnet workload install wasm-tools

# List installed workload
- name: List installed workloads
Expand Down
4 changes: 2 additions & 2 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"allowPrerelease": false,
"rollForward": "disable",
"allowPrerelease": true,
"rollForward": "latestMinor",
"version": "6.0.300"
}
}
2 changes: 1 addition & 1 deletion src/VijayAnand.MauiToolkit/Create-Debug-Package.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: Creates a new NuGet package from the project file in Debug configuration
@echo off

call Create-Package.bat Debug
call Create-Package-New.bat Debug
pause
60 changes: 60 additions & 0 deletions src/VijayAnand.MauiToolkit/Create-Package-New.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
:: Creates a new NuGet package from the project file
@echo off

if [%1]==[] (call Error "Build configuration input is not provided." & goto end)

set config=%1

:: Package Name

if not exist CorePackageName.txt (call Error "Core package name file not available." & goto end)

set /P corePkgName=<CorePackageName.txt

if [%corePkgName%]==[] (call Error "Core package name not configured." & goto end)

if not exist ToolkitPackageName.txt (call Error "Toolkit package name file not available." & goto end)

set /P toolkitPkgName=<ToolkitPackageName.txt

if [%toolkitPkgName%]==[] (call Error "Toolkit package name not configured." & goto end)

:: Package Version

if not exist PackageVersion.txt (call Error "Version file not available." & goto end)

set /P pkgVersion=<PackageVersion.txt

if [%pkgVersion%]==[] (call Error "Version # not configured." & goto end)

:: .NET SDK Version

dotnet --version

:: Package Configuration

call Info "Core Package: %corePkgName% ver. %pkgVersion%"
call Info "Toolkit Package: %toolkitPkgName% ver. %pkgVersion%"

call Info "Delete existing package ..."

if exist .\VijayAnand.MauiToolkit.Core\bin\%config%\%corePkgName%.%pkgVersion%.nupkg del .\VijayAnand.MauiToolkit.Core\bin\%config%\%corePkgName%.%pkgVersion%.nupkg

if exist .\VijayAnand.MauiToolkit\bin\%config%\%toolkitPkgName%.%pkgVersion%.nupkg del .\VijayAnand.MauiToolkit\bin\%config%\%toolkitPkgName%.%pkgVersion%.nupkg

call Info "Creating NuGet package ..."

dotnet build .\VijayAnand.MauiToolkit.Core\VijayAnand.MauiToolkit.Core.csproj -c %config% -p:PackageVersion=%pkgVersion% -p:ContinuousIntegrationBuild=true

if not %errorlevel% == 0 (call Error "Core package creation failed." & goto end)

echo.
:: Adding NuGet reference
::dotnet add .\VijayAnand.MauiToolkit\VijayAnand.MauiToolkit.csproj package %corePkgName% --version %pkgVersion%

dotnet build .\VijayAnand.MauiToolkit\VijayAnand.MauiToolkit.csproj -c %config% -p:PackageVersion=%pkgVersion% -p:ContinuousIntegrationBuild=true

echo.
if %errorlevel% == 0 (call Success "Process completed.") else (call Error "Toolkit package creation failed.")

:end
2 changes: 1 addition & 1 deletion src/VijayAnand.MauiToolkit/Create-Release-Package.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:: Creates a new NuGet package from the project file in Release configuration
@echo off

call Create-Package.bat Release
call Create-Package-New.bat Release
pause
2 changes: 1 addition & 1 deletion src/VijayAnand.MauiToolkit/PackageVersion.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.1-pre1
1.0.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
What's new in ver. 1.0.1-pre1:
What's new in ver. 1.0.1:

Route parameters in the Navigation service methods can also be passed as Tuple (string key, object value).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
<!-- Targets possible from macOS -->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('osx'))">$(TargetFrameworks);net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<!-- Uncomment to also build the Tizen app. You will need to install Tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks>

<!-- .NET MAUI -->
<UseMaui>true</UseMaui>
<MauiVersion>6.0.312</MauiVersion>
<SingleProject>true</SingleProject>

<!-- Project Options -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
What's new in ver. 1.0.1-pre1:
What's new in ver. 1.0.1:

Route parameters in the Navigation service methods can also be passed as Tuple (string key, object value).

Expand Down

0 comments on commit 6d438e0

Please sign in to comment.