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

Package updates #2030

Merged
merged 6 commits into from
Sep 27, 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
6 changes: 6 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Default owners
* @andyleejordan @bergmeister

# Version bumps and documentation updates
Directory.Build.props @sdwheeler @michaeltlombardi
/docs/ @sdwheeler @michaeltlombardi
231 changes: 5 additions & 226 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,226 +1,5 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
build/
bld/
[Bb]in/
[Oo]bj/

# Visual Studo 2015 cache/options directory
.vs/

# VSCode configuration directory
.vscode/

# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*

# NUNIT
*.VisualState.xml
TestResult.xml

# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c

# .Net Core CLI
project.lock.json
artifacts/

*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc

# Chutzpah Test files
_Chutzpah*

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile

# Visual Studio profiler
*.psess
*.vsp
*.vspx

# TFS 2012 Local Workspace
$tf/

# Guidance Automation Toolkit
*.gpState

# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user

# JustCode is a .NET coding addin-in
.JustCode

# TeamCity is a build add-in
_TeamCity*

# DotCover is a Code Coverage Tool
*.dotCover

# NCrunch
_NCrunch_*
.*crunch*.local.xml

# MightyMoose
*.mm.*
AutoTest.Net/

# Web workbench (sass)
.sass-cache/

# Installshield output folder
[Ee]xpress/

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish/

# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj

# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config

# Windows Azure Build Output
csx/
*.build.csdef

# Windows Store app package directory
AppPackages/

# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/

# Others
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
bower_components/

# RIA/Silverlight projects
Generated_Code/

# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm

# SQL Server files
*.mdf
*.ldf

# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings

# Microsoft Fakes
FakesAssemblies/

# Node.js Tools for Visual Studio
.ntvs_analysis.dat

# Visual Studio 6 build log
*.plg

# Visual Studio 6 workspace options file
*.opt

##Our project binplace location
PSScriptAnalyzer/

# Vim swap files
*.swp

# Test result file
TestResults.xml

# PSCompatibilityCollector module
PSCompatibilityCollector/out/

# Folder of build module
out

# Explicitely Include test dir
!/Tests/**
bin/
obj/
/module/
/out/
testResults.xml
4 changes: 2 additions & 2 deletions .pipelines/PSScriptAnalyzer-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ extends:
ob_outputDirectory: $(Build.SourcesDirectory)/out
steps:
- pwsh: |
[xml]$xml = Get-Content Engine/Engine.csproj
$version = $xml.SelectSingleNode(".//VersionPrefix")."#text"
[xml]$xml = Get-Content ./Directory.Build.props
$version = $xml.Project.PropertyGroup.ModuleVersion
Write-Output "##vso[task.setvariable variable=version;isOutput=true]$version"
name: package
displayName: Get version from project properties
Expand Down
7 changes: 7 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->
<PropertyGroup>
<ModuleVersion>1.22.0</ModuleVersion>
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
17 changes: 17 additions & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project>
<ItemGroup>
<!-- Newtonsoft.Json brings in an old version of CSharp. So, we are forcing a newer version. -->
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageVersion Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageVersion Include="Microsoft.PowerShell.4.ReferenceAssemblies" Version="1.0.0" />
<PackageVersion Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageVersion Include="Microsoft.Win32.Registry" Version="5.0.0" />
<!-- The version of Newtonsoft.Json needs to be newer than the version in the oldest supported version of PowerShell 7: https://github.com/PowerShell/PowerShell/blob/v7.2.17/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="Pluralize.NET" Version="1.0.2" />
<PackageVersion Include="PowerShellStandard.Library" Version="3.0.0-preview-02" />
<PackageVersion Include="System.Management.Automation" Version="7.2.23" />
<PackageVersion Include="System.Reflection.TypeExtensions" Version="4.7.0" />
</ItemGroup>
</Project>
14 changes: 7 additions & 7 deletions Engine/Engine.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>1.22.0</VersionPrefix>
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
<TargetFrameworks>net6;net462</TargetFrameworks>
<AssemblyName>Microsoft.Windows.PowerShell.ScriptAnalyzer</AssemblyName>
<AssemblyVersion>1.22.0</AssemblyVersion>
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
<PackageId>Engine</PackageId>
<RootNamespace>Microsoft.Windows.PowerShell.ScriptAnalyzer</RootNamespace> <!-- Namespace needs to match Assembly name for ressource binding -->
<LangVersion>9.0</LangVersion>
Expand Down Expand Up @@ -45,7 +45,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CSharp" />
</ItemGroup>

<!--
Expand All @@ -70,22 +70,22 @@


<ItemGroup Condition="'$(TargetFramework)' == 'net6'">
<PackageReference Include="System.Management.Automation" Version="7.0.13" />
<PackageReference Include="System.Management.Automation" />
</ItemGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net6'">
<DefineConstants>$(DefineConstants);PSV7;CORECLR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' == 'PSV3Release' AND '$(Configuration)' != 'PSV4Release'">
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' == 'PSV4Release'">
<PackageReference Include="Microsoft.PowerShell.4.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.PowerShell.4.ReferenceAssemblies" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462' AND '$(Configuration)' != 'PSV3Release'">
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" Version="1.1.0" />
<PackageReference Include="Microsoft.PowerShell.5.ReferenceAssemblies" />
</ItemGroup>

<PropertyGroup Condition=" '$(Configuration)' == 'PSV3Release' ">
Expand Down
2 changes: 1 addition & 1 deletion Engine/PSScriptAnalyzer.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Author = 'Microsoft Corporation'
RootModule = 'PSScriptAnalyzer.psm1'

# Version number of this module.
ModuleVersion = '1.22.0'
ModuleVersion = '{{ModuleVersion}}'

# ID used to uniquely identify this module
GUID = 'd6245802-193d-4068-a631-8863a4342a18'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,31 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<VersionPrefix>1.22.0</VersionPrefix>
<VersionPrefix>$(ModuleVersion)</VersionPrefix>
<TargetFrameworks>netstandard2.0;net462</TargetFrameworks>
<AssemblyVersion>1.22.0</AssemblyVersion>
<AssemblyVersion>$(ModuleVersion)</AssemblyVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<DefineConstants>$(DefineConstants);CoreCLR</DefineConstants>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<!-- The version of Newtonsoft.Json needs to be newer than the version in the oldest supported version of PowerShell 7: https://github.com/PowerShell/PowerShell/blob/v7.2.17/src/System.Management.Automation/System.Management.Automation.csproj#L15 -->
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="3.0.0" />
<PackageReference Include="PowerShellStandard.Library" Version="3.0.0-preview-02" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.Win32.Registry" />
<PackageReference Include="Microsoft.Management.Infrastructure" />
<PackageReference Include="PowerShellStandard.Library" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" Version="1.0.0" />
<PackageReference Include="Microsoft.Management.Infrastructure" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Microsoft.PowerShell.3.ReferenceAssemblies" />
<PackageReference Include="Microsoft.Management.Infrastructure" VersionOverride="1.0.0" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Microsoft.CSharp" />
</ItemGroup>

</Project>
Loading