Skip to content

Commit

Permalink
removed commented-out code
Browse files Browse the repository at this point in the history
  • Loading branch information
danzuep committed Dec 6, 2023
1 parent 3cddd82 commit 5e0cace
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 89 deletions.
39 changes: 1 addition & 38 deletions .github/workflows/_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ on:
env:
DotNetVersion: 8.0.x
DotNetTarget: net8.0
# https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
SourceLink: https://aka.ms/dotnet8/nuget/index.json
# https://maui.blob.core.windows.net/metadata/rollbacks/net8.0.json
RollbackLink: https://aka.ms/dotnet/maui/net8.0.json
NuGetLink: https://api.nuget.org/v3/index.json

jobs:
deploy:
Expand Down Expand Up @@ -60,44 +55,12 @@ jobs:
echo "Project Name: ${{ inputs.projectName }}";
dotnet workload install maui-android;
dotnet workload list;
# dotnet nuget locals all --clear;
# dotnet workload restore;
# dotnet workload install maui maui-android maui-ios;
# dotnet workload install maui android ios maccatalyst tvos macos wasm-tools ${{ env.PackageLinks }}
env:
PackageLinks: "--from-rollback-file ${{env.RollbackLink}} --source ${{env.SourceLink}} --source ${{env.NuGetLink}}"

# - name: Create signing pfx file from secrets
# shell: pwsh
# id: secret-file
# env:
# SECRET_DATA1: ${{ secrets.WIN_SIGN_CERT }}
# run: |
# $secretFile = "XamCATFidCert.pfx";
# $encodedBytes = [System.Convert]::FromBase64String($env:SECRET_DATA1);
# Set-Content $secretFile -Value $encodedBytes -AsByteStream;
# Write-Output "SECRET_FILE=${secretFile}" | Out-File -FilePath $env:GITHUB_ENV -Append
# if (-Not (Test-Path -Path "${kestorePath}" -PathType Leaf)) {
# throw "The file '${kestorePath}' was not found."
# }

# - name: Pack Windows App
# shell: pwsh
# run: |
# & "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\MakeAppx" pack /v /h SHA256 /d "<OUTPUT_FOLDER_PATH>" /p <PATH TO MSIX>.msix
# & ls

# - name: Sign Windows App
# shell: pwsh
# env:
# CERT_PASSWORD: ${{ secrets.WIN_CERT_PASSWORD }}
# run: |
# & "C:\Program Files (x86)\Windows Kits\10\App Certification Kit\SignTool" sign /a /fd SHA256 /f XamCATFidCert.pfx /p $WIN_CERT_PASSWORD <PATH TO MSIX>.msix
- name: Publish Android package
run: |
echo "Project File: $projectFile";
echo "Project Version: $buildVersion";
echo "Target Framework: $targetFramework";
dotnet publish $projectFile -c $configuration -f $targetFramework /p:Version=$buildVersion /p:AndroidPackageFormats=$androidPackageFormats -o $publishOutputFolder --nologo;
env:
projectFile: '${{ inputs.projectFile }}'
Expand Down
15 changes: 1 addition & 14 deletions .github/workflows/_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,6 @@ jobs:
echo "## $projectName" > release-notes.txt
git log --pretty=format:"- %s" >> release-notes.txt
# # TODO: fix this
# - run: |
# echo "Generate release notes from the Git commit log."
# last_tag=$(git describe --abbrev=0 --tags 2>/dev/null)
# if [[ -z "$last_tag" ]]; then
# echo "## $projectName" > release-notes.txt
# git log --pretty=format:"- %s" >> release-notes.txt
# else
# echo "## $projectName changes since $last_tag" > release-notes.txt
# git log --pretty=format:"- %s" --since="$last_tag" >> release-notes.txt
# fi

# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/setup/usage-examples.md#example-1
- name: Set up GitVersion
uses: gittools/actions/gitversion/setup@v0
Expand All @@ -77,9 +65,8 @@ jobs:

# https://github.com/GitTools/actions/blob/main/docs/examples/github/gitversion/execute/usage-examples.md#example-5
# For a list of all GitVersion Version Variables, see https://gitversion.net/docs/reference/variables
# pwsh> dotnet-gitversion | ConvertFrom-Json
- name: Use GitVersion to determine version
id: gitversion # e.g. steps.gitversion.outputs.<outputName>
id: gitversion
uses: gittools/actions/gitversion/execute@v0

- run: |
Expand Down
41 changes: 14 additions & 27 deletions LocalGuideAI/LocalGuideAI.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('macOS'))">$(TargetFrameworks);net8.0-ios;net8.0-macios</TargetFrameworks>
<TargetFrameworks>net8.0-android</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('macOS'))">$(TargetFrameworks);net8.0-ios;net8.0-macios</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</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);net8.0-tizen</TargetFrameworks> -->
Expand Down Expand Up @@ -31,9 +31,9 @@
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>

<!-- C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
<!-- C# Hot Reload -->
<UseInterpreter Condition="'$(Configuration)' == 'Debug'">True</UseInterpreter>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
Expand Down Expand Up @@ -81,40 +81,27 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.9" />
<PackageReference Include="CommunityToolkit.Maui" Version="7.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Azure.AI.OpenAI" Version="1.0.0-beta.9" />
<PackageReference Include="CommunityToolkit.Maui" Version="7.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests</_Parameter1>
</AssemblyAttribute>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>$(MSBuildProjectName).Tests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>

<ItemGroup>
<None Include="../*" LinkBase="Solution Items" />
<None Include="../*" LinkBase="Solution Items" />
</ItemGroup>

<ItemGroup>
<None Remove="Resources\Fonts\MaterialIcons-Regular.ttf" />
<None Remove="Resources\Fonts\MaterialIconsOutlined-Regular.otf" />
</ItemGroup>

<ItemGroup>
<Compile Update="Views\SettingsPage.xaml.cs">
<DependentUpon>SettingsPage.xaml</DependentUpon>
</Compile>
</ItemGroup>

<ProjectExtensions><VisualStudio><UserProperties XamarinHotReloadDebuggerTimeoutExceptionLocalGuideAIHideInfoBar="True" /></VisualStudio></ProjectExtensions>

</Project>
10 changes: 0 additions & 10 deletions Scripts/publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@ $projectName = $projectDirectory.BaseName;
$projectAppName = "${projectName}";
$projectFile="${projectFolder}/${projectAppName}/${projectAppName}.csproj";

# #$dotnetVersion="8.0.x";
# $NuGetLink="https://api.nuget.org/v3/index.json"
# # https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet8/nuget/v3/index.json
# $SourceLink="https://aka.ms/dotnet8/nuget/index.json"
# # https://maui.blob.core.windows.net/metadata/rollbacks/net8.0.json
# $RollbackLink="https://aka.ms/dotnet/maui/net8.0.json"
# $PackageLinks="--from-rollback-file ${RollbackLink} --source ${SourceLink} --source ${NuGetLink}"
# dotnet workload install maui android ${PackageLinks}

# restore the base project dependencies
Set-Location -Path "${projectFolder}";
dotnet restore "${projectFile}";
Expand Down Expand Up @@ -53,7 +44,6 @@ Write-Host "Local .NET Version: "; dotnet --version;
Write-Host "Target Framework: ${targetFramework}";
Write-Host "Project File: ${projectFile} (version ${buildVersion})";

# dotnet publish "${projectFile}" -c $configuration --framework $targetFramework /p:Version=$buildVersion /p:AndroidPackageFormats=$androidPackageFormats -o "${publishOutputFolder}" --no-restore --nologo;
dotnet publish "${projectFile}" -c $configuration --framework $targetFramework /p:Version=$buildVersion /p:AndroidPackageFormats=$androidPackageFormats /p:AndroidKeyStore=true /p:AndroidSigningKeyStore="${kestorePath}" /p:AndroidSigningKeyAlias="${androidSigningAlias}" /p:AndroidSigningKeyPass="${Env:AndroidSigningPassword}" /p:AndroidSigningStorePass="${Env:AndroidSigningPassword}" -o "${publishOutputFolder}" --no-restore --nologo;
if (-not $?) {
Write-Host "Project failed to publish.";
Expand Down

0 comments on commit 5e0cace

Please sign in to comment.