Skip to content

Commit

Permalink
Merge branch 'main' into sma-private
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT committed Nov 24, 2020
2 parents 9007cf5 + 4bd0be2 commit 1eb921b
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 66 deletions.
14 changes: 7 additions & 7 deletions src/Microsoft.PowerShell.TextUtility.format.ps1xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
<ScriptBlock>
Set-StrictMode -Off

$deleteColor = "`e[1;9;31m"
$insertColor = "`e[0;1;32m"
$resetColor = "`e[0m"
$deleteColor = "$([char]0x1b)[1;9;31m"
$insertColor = "$([char]0x1b)[0;1;32m"
$resetColor = "$([char]0x1b)[0m"
$textBuilder = [System.Text.StringBuilder]::new()
$newline = [System.Environment]::NewLine

Expand Down Expand Up @@ -85,10 +85,10 @@

$deleteText = [System.Text.StringBuilder]::new()
$insertText = [System.Text.StringBuilder]::new()
$deleteColor = "`e[1;9;31m"
$insertColor = "`e[0;1;32m"
$resetColor = "`e[0m"
$ellipsis = "`u{2026}"
$deleteColor = "$([char]0x1b)[1;9;31m"
$insertColor = "$([char]0x1b)[0;1;32m"
$resetColor = "$([char]0x1b)[0m"
$ellipsis = [char]0x2026
$newline = [System.Environment]::NewLine

foreach ($diff in $_.Diff) {
Expand Down
63 changes: 8 additions & 55 deletions src/Microsoft.PowerShell.TextUtility.psd1
Original file line number Diff line number Diff line change
@@ -1,75 +1,28 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

@{
# Script module or binary module file associated with this manifest.
RootModule = '.\Microsoft.PowerShell.TextUtility.dll'

# Version number of this module.
ModuleVersion = '1.0.0'

# Supported PSEditions
ModuleVersion = '0.1.0'
CompatiblePSEditions = @('Desktop', 'Core')

# ID used to uniquely identify this module
GUID = '5cb64356-cd04-4a18-90a4-fa4072126155'

# Author of this module
Author = 'Microsoft Corporation'

# Company or vendor of this module
CompanyName = 'Microsoft Corporation'

# Copyright statement for this module
Copyright = '(c) Microsoft Corporation. All rights reserved.'

# Description of the functionality provided by this module
Description = "This module contains cmdlets to help with manipulating or reading text."

# Minimum version of the PowerShell engine required by this module
PowerShellVersion = '5.1'

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @('Microsoft.PowerShell.TextUtility.format.ps1xml')

# 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 = @(
'Compare-Text','ConvertFrom-Base64','ConvertTo-Base64'
)

# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
PrivateData = @{

PSData = @{
LicenseUri = 'https://github.com/PowerShell/TextUtility/blob/main/LICENSE'
ProjectUri = 'https://github.com/PowerShell/TextUtility'
ReleaseNotes = 'Initial release'
Prerelease = 'Preview1'
}
}

# Tags applied to this module. These help with module discovery in online galleries.
# Tags = @()

# A URL to the license for this module.
LicenseUri = 'https://github.com/PowerShell/Modules/License.txt'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/PowerShell/Modules'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
# ReleaseNotes = ''

# Prerelease string of this module
# Prerelease = ''

# Flag to indicate whether the module requires explicit user acceptance for install/update/save
# RequireLicenseAcceptance = $false

# External dependent modules of this module
# ExternalModuleDependencies = @()
} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

}
2 changes: 1 addition & 1 deletion yaml/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
name: $(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
Expand Down
9 changes: 6 additions & 3 deletions yaml/releaseBuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
name: $(Date:yyyyMMdd)$(Rev:.rr)

variables:
# Don't download unneeded packages
Expand Down Expand Up @@ -48,6 +48,9 @@ stages:
vmImage: 'vs2017-win2016'
steps:
- pwsh: |
# build agents get reused so we make sure to remove the old archive
Remove-Item -Path $(Build.SourcesDirectory)/SignedZip -Recurse -Force -ErrorAction Ignore
Remove-Item -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -Recurse -Force -ErrorAction Ignore
.\build.ps1 -Clean
Remove-Item .\out\*.pdb
displayName: Build
Expand Down Expand Up @@ -91,8 +94,8 @@ stages:
useMinimatch: false

- pwsh: |
New-Item -Path $(Build.SourcesDirectory)/SignedZip -ItemType Directory
Compress-Archive -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/SignedZip/Microsoft.PowerShell.TextUtility.zip
New-Item -Path $(Build.SourcesDirectory)/SignedZip -ItemType Directory -ErrorAction Ignore
Compress-Archive -Path $(Build.SourcesDirectory)/Microsoft.PowerShell.TextUtility -DestinationPath $(Build.SourcesDirectory)/SignedZip/Microsoft.PowerShell.TextUtility.zip -Force
displayName: 'Compress archive'
condition: succeededOrFailed()
Expand Down

0 comments on commit 1eb921b

Please sign in to comment.