<commit_before>﻿<# Copyright © 2018 <NAME>

This file is part of AudioWorks.

AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.

AudioWorks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License along with AudioWorks. If not, see
<https://www.gnu.org/licenses/>. #>

param(
    [string] $ProjectDir,
    [string] $Configuration,
    [string] $Framework)

$outputRoot = "$($ProjectDir)bin\$Configuration\AudioWorks.Commands"
$outputDir = "$outputRoot\$Framework"

Write-Host "Clearing $outputDir..."

if (Test-Path $outputDir) { Remove-Item -Path $outputDir -Recurse -ErrorAction Stop }

Write-Host "Publishing $Framework PowerShell module to $outputDir..."

dotnet publish "$ProjectDir" --no-build -c $Configuration -o "$outputDir" -f $Framework
Copy-Item -Path "$outputDir\*" -Destination $outputRoot -Include "*.psd1", "*.ps1xml", "COPYING", "COPYING.LESSER" -ErrorAction Stop
Remove-Item -Path "$outputDir\*" -Recurse -Include "*.psd1", "*.ps1xml", "*.xml", "*.pdb", "*.deps.json", "COPYING", "COPYING.LESSER" -ErrorAction Stop

Write-Host "Generating help file..."

Install-Module -Name platyPS -Scope CurrentUser -ErrorAction Stop<commit_msg>Force installation of module from untrusted repository.<commit_after>﻿<# Copyright © 2018 <NAME>

This file is part of AudioWorks.

AudioWorks is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
version.

AudioWorks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
details.

You should have received a copy of the GNU Lesser General Public License along with AudioWorks. If not, see
<https://www.gnu.org/licenses/>. #>

param(
    [string] $ProjectDir,
    [string] $Configuration,
    [string] $Framework)

$outputRoot = "$($ProjectDir)bin\$Configuration\AudioWorks.Commands"
$outputDir = "$outputRoot\$Framework"

Write-Host "Clearing $outputDir..."

if (Test-Path $outputDir) { Remove-Item -Path $outputDir -Recurse -ErrorAction Stop }

Write-Host "Publishing $Framework PowerShell module to $outputDir..."

dotnet publish "$ProjectDir" --no-build -c $Configuration -o "$outputDir" -f $Framework
Copy-Item -Path "$outputDir\*" -Destination $outputRoot -Include "*.psd1", "*.ps1xml", "COPYING", "COPYING.LESSER" -ErrorAction Stop
Remove-Item -Path "$outputDir\*" -Recurse -Include "*.psd1", "*.ps1xml", "*.xml", "*.pdb", "*.deps.json", "COPYING", "COPYING.LESSER" -ErrorAction Stop

Write-Host "Generating help file..."

Install-Module -Name platyPS -Scope CurrentUser -Force -ErrorAction Stop
{'fraction_non_alphanumeric': 0.11596899224806202, 'fraction_numerical': 0.005581395348837209, 'mean_word_length': 4.63986013986014, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1883543', 'n_tokens_mistral': 951, 'n_tokens_neox': 910, 'n_words': 380}