Skip to content

Commit

Permalink
Review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
corbob committed Mar 7, 2024
1 parent 4a13d0f commit 619cc2a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
/_build
Output
/chocolatey/tools/AU
/chocolatey/tools/install.ps1
/chocolatey/*.nupkg
/vars.ps1
/code_drop
/tests/.vscode/launch.json
/.vscode/launch.json
13 changes: 10 additions & 3 deletions Chocolatey-AU.build.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[string]
$OutputDirectory = "$PSScriptRoot/Output",
$OutputDirectory = "$PSScriptRoot/code_drop",


[string]
Expand Down Expand Up @@ -104,7 +104,7 @@ function Register-PSRepositoryFix {

# Synopsis: ensure GitVersion is installed
task InstallGitVersion {
if (-not (Get-Command gitversion -ErrorAction Ignore)) {
if ((-not (Get-Command gitversion -ErrorAction Ignore)) -and (-not (Get-Command dotnet-gitversion -ErrorAction Ignore))) {
Write-Host "Gitversion not installed. Attempting to install"

if (-not ([Security.Principal.WindowsPrincipal]([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)){
Expand Down Expand Up @@ -175,7 +175,14 @@ task Build Clean, InstallGitVersion, ScriptAnalyzer, {
Copy-Item "$script:SourceFolder/*" -Destination $script:ModuleOutputDir -Recurse
$manifest = Get-ChildItem "$OutputDirectory/$ModuleName/$ModuleName.psd1"

$gitversion = gitversion.exe
$gitversion = if (Get-Command gitversion -ErrorAction Ignore)
{
gitversion.exe
}
else {
dotnet-gitversion.exe
}

$gitversion | Out-String -Width 120 | Write-Host
$versionInfo = $gitversion 2>$null | ConvertFrom-Json
$manifestUpdates = @{
Expand Down
1 change: 1 addition & 0 deletions GitReleaseManager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ close:
The release is available on:
- [GitHub Release](https://github.com/{owner}/{repository}/releases/tag/{milestone})
- [Chocolatey Community Repository](https://community.chocolatey.org/packages/{repository}/{milestone})
- [PowerShell Gallery](https://www.powershellgallery.com/packages/{repository}/{milestone})
Your **[GitReleaseManager](https://github.com/GitTools/GitReleaseManager)** bot :package: :rocket:
4 changes: 2 additions & 2 deletions src/Chocolatey-AU.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
'Test-Package', 'Update-AUPackages', 'Update-Package'

# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
CmdletsToExport = '*'
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = '*'
VariablesToExport = @()

# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
AliasesToExport = 'gau', 'lsau', 'update', 'updateall'
Expand Down

0 comments on commit 619cc2a

Please sign in to comment.