Skip to content

Commit

Permalink
Merge branch 'main' into issue1215
Browse files Browse the repository at this point in the history
  • Loading branch information
freddydk authored Oct 25, 2024
2 parents 4f55bf3 + a9088bd commit 2e6e5e0
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Actions/Packages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sign": "0.9.1-beta.24123.2",
"sign": "0.9.1-beta.24469.1",
"Microsoft.ApplicationInsights": "2.20.0",
"Az.Accounts": "2.15.1",
"Az.Storage": "6.1.1",
Expand Down
3 changes: 3 additions & 0 deletions Actions/RunPipeline/RunPipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ $projectPath = $null

try {
. (Join-Path -Path $PSScriptRoot -ChildPath "..\AL-Go-Helper.ps1" -Resolve)
Import-Module (Join-Path $PSScriptRoot '..\TelemetryHelper.psm1' -Resolve)
DownloadAndImportBcContainerHelper

if ($isWindows) {
Expand Down Expand Up @@ -255,6 +256,8 @@ try {
$scriptPath = Join-Path $ALGoFolderName "$ScriptName.ps1"
if (Test-Path -Path $scriptPath -Type Leaf) {
Write-Host "Add override for $scriptName"
Trace-Information -Message "Using override for $scriptName"

$runAlPipelineParams += @{
"$scriptName" = (Get-Command $scriptPath | Select-Object -ExpandProperty ScriptBlock)
}
Expand Down
23 changes: 21 additions & 2 deletions Actions/Sign/Sign.psm1
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<#
.SYNOPSIS
Checks whether nuget.org is added as a nuget source.
#>
function AssertNugetSourceIsAdded() {
$nugetSource = "https://api.nuget.org/v3/index.json"
$nugetSourceExists = dotnet nuget list source | Select-String -Pattern $nugetSource
if (-not $nugetSourceExists) {
throw "Nuget source $nugetSource is not added. Please add the source using 'dotnet nuget add source $nugetSource' or add another source with nuget.org as an upstream source."
}
}

<#
.SYNOPSIS
Installs the dotnet signing tool.
Expand All @@ -16,10 +28,17 @@ function Install-SigningTool() {
# Install the signing tool in the temp folder
Write-Host "Installing signing tool version $version in $tempFolder"
New-Item -ItemType Directory -Path $tempFolder | Out-Null
dotnet tool install sign --version $version --tool-path $tempFolder | Out-Null
dotnet tool install sign --version $version --tool-path $tempFolder | Out-Host

# Return the path to the signing tool
$signingTool = Join-Path -Path $tempFolder "sign.exe" -Resolve
$signingTool = Join-Path -Path $tempFolder "sign.exe"
if (-not (Test-Path -Path $signingTool)) {
# Check if nuget.org is added as a nuget source
AssertNugetSourceIsAdded

# If the tool is not found, throw an error
throw "Failed to install signing tool. If you are using a self-hosted runner please make sure you've followed all the steps described in https://aka.ms/algosettings#runs-on."
}
return $signingTool
}

Expand Down
2 changes: 1 addition & 1 deletion Scenarios/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ When running a workflow or a local script, the settings are applied by reading s
| Name | Description | Default value |
| :-- | :-- | :-- |
| <a id="appSourceCopMandatoryAffixes"></a>appSourceCopMandatoryAffixes | This setting is only used if the type is AppSource App. The value is an array of affixes, which is used for running AppSource Cop. | \[ \] |
| <a id="deliverToAppSource"></a>deliverToAppSource | Structure with properties for AppSource delivery from AL-Go for GitHub. The structure can contain the following properties:<br />**productId** must be the product Id from partner Center.<br />**mainAppFolder** specifies the appFolder of the main app if you have multiple apps in the same project.<br />**continuousDelivery** can be set to true to enable continuous delivery of every successful build to AppSource Validation. Note that the app will only be in preview in AppSource and you will need to manually press GO LIVE in order for the app to be promoted to production.<br />**includeDependencies** can be set to an array of file names (incl. wildcards) which are the names of the dependencies to include in the AppSource submission. You need to set `generateDependencyArtifact` in the [project settings file](#where-are-the-settings-located) to true in order to include dependencies.<br />**Note:** You will need to define an AppSourceContext secret in order to publish to AppSource. | |
| <a id="deliverToAppSource"></a>deliverToAppSource | Structure with properties for AppSource delivery from AL-Go for GitHub. The structure can contain the following properties:<br />**branches** = an array of branch patterns, which are allowed to deliver to AppSource. (Default main)<br />**productId** must be the product Id from partner Center.<br />**mainAppFolder** specifies the appFolder of the main app if you have multiple apps in the same project.<br />**continuousDelivery** can be set to true to enable continuous delivery of every successful build to AppSource Validation. Note that the app will only be in preview in AppSource and you will need to manually press GO LIVE in order for the app to be promoted to production.<br />**includeDependencies** can be set to an array of file names (incl. wildcards) which are the names of the dependencies to include in the AppSource submission. You need to set `generateDependencyArtifact` in the [project settings file](#where-are-the-settings-located) to true in order to include dependencies.<br />**Note:** You will need to define an AppSourceContext secret in order to publish to AppSource. | |
| <a id="obsoleteTagMinAllowedMajorMinor"></a>obsoleteTagMinAllowedMajorMinor | This setting will enable AppSource cop rule AS0105, which causes objects that are pending obsoletion with an obsolete tag version lower than the minimum set in this property are not allowed. | |

## Basic Repository settings
Expand Down

0 comments on commit 2e6e5e0

Please sign in to comment.