Skip to content

Commit

Permalink
Merge branch 'main' into FixChangelogListFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianJ-TV authored Oct 4, 2023
2 parents d07eca3 + a8d4c92 commit be1b7a3
Show file tree
Hide file tree
Showing 318 changed files with 6,179 additions and 393 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Install-Module -Name PSScriptAnalyzer -SkipPublisherCheck -Scope CurrentUser -MinimumVersion 1.19.1 -Force -Verbose
Invoke-ScriptAnalyzer -Path $env:GITHUB_WORKSPACE -Recurse -Settings (Join-Path -Path $env:GITHUB_WORKSPACE/Linters -ChildPath 'PSScriptAnalyzer.psd1') -ReportSummary -EnableExit
Invoke-ScriptAnalyzer -Path $env:GITHUB_WORKSPACE -Recurse -Settings (Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'Linters\PSScriptAnalyzer.psd1') -ReportSummary -EnableExit
# Run tests
- name: Run tests (via Pester)
shell: pwsh
Expand All @@ -46,4 +46,4 @@ jobs:
$ProgressPreference = 'SilentlyContinue'
$ErrorActionPreference = 'Stop'
Install-Module -Name platyPS, BuildHelpers -SkipPublisherCheck -Scope CurrentUser -Force
& $env:GITHUB_WORKSPACE/Build/New-Package.ps1 -Verbose
& (Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath 'Build\New-Package.ps1') -Verbose
33 changes: 0 additions & 33 deletions .github/workflows/publish_testing.yml

This file was deleted.

86 changes: 33 additions & 53 deletions Build/New-Package.ps1
Original file line number Diff line number Diff line change
@@ -1,74 +1,54 @@
#requires -Modules platyPS, BuildHelpers
#requires -Modules BuildHelpers, platyPS

param(
[Parameter()]
[string]
$BuildOutputPath = "$(Resolve-Path "$PSScriptRoot/..")/Build/Output"
[string]$Build_OutputPath = "$(Resolve-Path "$PSScriptRoot\..")\Build\Output"
)

$repoPath = Resolve-Path "$PSScriptRoot/.."
$Repo_RootPath = Resolve-Path -Path "$PSScriptRoot\.."
$Repo_CmdletPath = Resolve-Path -Path "$PSScriptRoot\..\Cmdlets"

if (Test-Path $BuildOutputPath) {
Write-Verbose 'Removing existing build output directory'
Remove-Item $BuildOutputPath -Recurse -ErrorAction SilentlyContinue
if (Test-Path -Path $Build_OutputPath) {
Write-Verbose 'Removing existing build output directory...'
Remove-Item -Path $Build_OutputPath -Recurse -ErrorAction SilentlyContinue
}
Write-Verbose 'Creating build output directories.'
New-Item -Type Directory $BuildOutputPath | Out-Null

Write-Verbose 'Creating build output directories...'
New-Item -Type Directory $Build_OutputPath | Out-Null

# Compile all functions into a single psm file
$targetFile = "$BuildOutputPath/TeamViewerPS.psm1"
Write-Verbose 'Compiling single-file TeamViewer module.'
$ModuleTypes = @(Get-ChildItem -Path "$repoPath/Docs/TeamViewerPS.Types.ps1")
$PrivateFunctions = @(Get-ChildItem `
-Path "$repoPath/Docs/Cmdlets/Private/*.ps1" `
-ErrorAction SilentlyContinue)
$Build_ModulePath = (Join-Path -Path $Repo_CmdletPath -ChildPath 'TeamViewerPS.psm1')

Write-Verbose 'Compiling single-file TeamViewer module...'
$ModuleTypes = @(Get-ChildItem -Path (Join-Path -Path $Repo_CmdletPath -ChildPath 'TeamViewerPS.Types.ps1'))

$PrivateFunctions = @(Get-ChildItem -Path (Join-Path -Path $Repo_CmdletPath -ChildPath 'Private\*.ps1') -ErrorAction SilentlyContinue)
Write-Verbose "Found $($PrivateFunctions.Count) private function files."
$PublicFunctions = @(Get-ChildItem `
-Path "$repoPath/Docs/Cmdlets/Public/*.ps1" `
-ErrorAction SilentlyContinue)

$PublicFunctions = @(Get-ChildItem -Path (Join-Path -Path $Repo_CmdletPath -ChildPath 'Public\*.ps1') -ErrorAction SilentlyContinue)
Write-Verbose "Found $($PublicFunctions.Count) public function files."
@($ModuleTypes + $PrivateFunctions + $PublicFunctions) | `
Get-Content -Raw | `
ForEach-Object { $_; "`r`n" } | `
Set-Content -Path $targetFile -Encoding UTF8

@($ModuleTypes + $PrivateFunctions + $PublicFunctions) | Get-Content -Raw | ForEach-Object { $_; "`r`n" } | Set-Content -Path $Build_ModulePath -Encoding UTF8

# Create help from markdown
Write-Verbose 'Building help from Markdown'
New-ExternalHelp `
-Path "$repoPath/Docs" `
-OutputPath "$BuildOutputPath/en-US" | `
Out-Null
New-ExternalHelp `
-Path "$repoPath/Docs/Cmdlets_help" `
-OutputPath "$BuildOutputPath/en-US" | `
Out-Null
Write-Verbose 'Building help from Markdown...'
New-ExternalHelp -Path (Join-Path -Path $Repo_RootPath -ChildPath 'Docs') -OutputPath (Join-Path -Path $Build_OutputPath -ChildPath 'en-US') | Out-Null
New-ExternalHelp -Path (Join-Path -Path $Repo_RootPath -ChildPath 'Docs\Help') -OutputPath (Join-Path -Path $Build_OutputPath -ChildPath 'en-US') | Out-Null

# Create module manifest
Write-Verbose 'Creating module manifest'
Copy-Item `
-Path "$repoPath/Docs/TeamViewerPS.psd1" `
-Destination "$BuildOutputPath/"
Copy-Item `
-Path "$repoPath/Docs/*.format.ps1xml" `
-Destination "$BuildOutputPath/"
Update-Metadata `
-Path "$BuildOutputPath/TeamViewerPS.psd1" `
-PropertyName 'FunctionsToExport' `
-Value $PublicFunctions.BaseName
Write-Verbose 'Creating module manifest...'
Copy-Item -Path (Join-Path -Path $Repo_CmdletPath -ChildPath 'TeamViewerPS.psd1') -Destination $Build_OutputPath
Copy-Item -Path (Join-Path -Path $Repo_CmdletPath -ChildPath '*.format.ps1xml') -Destination $Build_OutputPath

Update-Metadata -Path (Join-Path -Path $Repo_CmdletPath -ChildPath 'TeamViewerPS.psd1') -PropertyName 'FunctionsToExport' -Value $PublicFunctions.BaseName

# Copy additional package files
Write-Verbose 'Copying additional files into the package'
Copy-Item `
-Path `
"$repoPath/LICENSE.md", `
"$repoPath/CHANGELOG.md", `
"$repoPath/README.md"`
-Destination "$BuildOutputPath/"
Write-Verbose 'Copying additional files into the package...'
Copy-Item -Path (Join-Path -Path $Repo_RootPath -ChildPath 'CHANGELOG.md') -Destination "$Build_OutputPath"
Copy-Item -Path (Join-Path -Path $Repo_RootPath -ChildPath 'LICENSE.md') -Destination "$Build_OutputPath"
Copy-Item -Path (Join-Path -Path $Repo_RootPath -ChildPath 'README.md') -Destination "$Build_OutputPath"

Write-Verbose 'Listing package files:'
Push-Location $BuildOutputPath
Get-ChildItem -Recurse "$BuildOutputPath/" | `
Sort-Object -Property FullName | `
Resolve-Path -Relative
Push-Location -Path $Build_OutputPath
Get-ChildItem -Path "$Build_OutputPath\" -Recurse | Sort-Object -Property FullName | Resolve-Path -Relative
Pop-Location
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,4 @@

## 1.0.0 (2021-01-15)

- Initial release of TeamViewerPS
- Initial release of TeamViewerPS
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions docs/TeamViewerPS.psd1 → Cmdlets/TeamViewerPS.psd1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@{
@{
# Script module or binary module file associated with this manifest.
RootModule = 'TeamViewerPS.psm1'

Expand All @@ -18,7 +18,7 @@
CompanyName = 'TeamViewer Germany GmbH'

# Copyright statement for this module.
Copyright = '(c) 2021-2022 TeamViewer Germany GmbH. All rights reserved.'
Copyright = '(c) 2021-2023 TeamViewer Germany GmbH. All rights reserved.'

# Description of the functionality provided by this module.
Description = 'TeamViewerPS allows to interact with the TeamViewer Web API as well as a locally installed TeamViewer client.'
Expand Down Expand Up @@ -60,7 +60,7 @@
# NestedModules = @()

# Functions to export from this module.
FunctionsToExport = '*'
FunctionsToExport = @('Add-TeamViewerAssignment','Add-TeamViewerCustomization','Add-TeamViewerManagedDevice','Add-TeamViewerManager','Add-TeamViewerRoleToAccount','Add-TeamViewerRoleToUserGroup','Add-TeamViewerSsoExclusion','Add-TeamViewerUserGroupMember','Connect-TeamViewerApi','Disconnect-TeamViewerApi','Export-TeamViewerSystemInformation','Get-TeamViewerAccount','Get-TeamViewerConnectionReport','Get-TeamViewerContact','Get-TeamViewerCustomModuleId','Get-TeamViewerDevice','Get-TeamViewerEventLog','Get-TeamViewerGroup','Get-TeamViewerId','Get-TeamViewerInstallationDirectory','Get-TeamViewerLogFilePath','Get-TeamViewerManagedDevice','Get-TeamViewerManagedGroup','Get-TeamViewerManagementId','Get-TeamViewerManager','Get-TeamViewerPolicy','Get-TeamViewerRoleAssignmentToAccount','Get-TeamViewerRoleAssignmentToUserGroup','Get-TeamViewerService','Get-TeamViewerSsoDomain','Get-TeamViewerSsoExclusion','Get-TeamViewerUser','Get-TeamViewerUserGroup','Get-TeamViewerUserGroupMember','Get-TeamViewerUserRole','Get-TeamViewerVersion','Invoke-TeamViewerPackageDownload','Invoke-TeamViewerPing','New-TeamViewerContact','New-TeamViewerDevice','New-TeamViewerGroup','New-TeamViewerManagedGroup','New-TeamViewerPolicy','New-TeamViewerUser','New-TeamViewerUserGroup','New-TeamViewerUserRole','Publish-TeamViewerGroup','Remove-TeamViewerAssignment','Remove-TeamViewerContact','Remove-TeamViewerCustomization','Remove-TeamViewerDevice','Remove-TeamViewerGroup','Remove-TeamViewerManagedDevice','Remove-TeamViewerManagedDeviceManagement','Remove-TeamViewerManagedGroup','Remove-TeamViewerManager','Remove-TeamViewerPolicy','Remove-TeamViewerPolicyFromManagedDevice','Remove-TeamViewerPSProxy','Remove-TeamViewerRoleFromAccount','Remove-TeamViewerRoleFromUserGroup','Remove-TeamViewerSsoExclusion','Remove-TeamViewerUser','Remove-TeamViewerUserGroup','Remove-TeamViewerUserGroupMember','Remove-TeamViewerUserRole','Restart-TeamViewerService','Set-TeamViewerAccount','Set-TeamViewerAPIUri','Set-TeamViewerDevice','Set-TeamViewerGroup','Set-TeamViewerManagedDevice','Set-TeamViewerManagedGroup','Set-TeamViewerManager','Set-TeamViewerPolicy','Set-TeamViewerPSProxy','Set-TeamViewerUser','Set-TeamViewerUserGroup','Set-TeamViewerUserRole','Start-TeamViewerService','Stop-TeamViewerService','Test-TeamViewerConnectivity','Test-TeamViewerInstallation','Unpublish-TeamViewerGroup')

# Cmdlets to export from this module.
CmdletsToExport = @()
Expand Down
Loading

0 comments on commit be1b7a3

Please sign in to comment.