Skip to content

Commit

Permalink
Merge pull request #255 from StartAutomating/gitting-cooler
Browse files Browse the repository at this point in the history
ugit 0.4.3: Gitting cooler
  • Loading branch information
StartAutomating authored Feb 28, 2024
2 parents a95bdd1 + 651dcf3 commit c3033a2
Show file tree
Hide file tree
Showing 113 changed files with 1,319 additions and 1,115 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions Build/ugit.GitHubAction.PSDevOps.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#requires -Module PSDevOps
Import-BuildStep -SourcePath (
Join-Path $PSScriptRoot 'GitHub'
) -BuildSystem GitHubAction
Push-Location ($PSScriptRoot | Split-Path)
New-GitHubAction -Name "UseUGit" -Description 'Updated Git' -Action UGitAction -Icon git-merge -OutputPath .\action.yml
Pop-Location
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#requires -Module PSDevOps
Push-Location $PSScriptRoot
Import-BuildStep -ModuleName ugit
Import-BuildStep -SourcePath (
Join-Path $PSScriptRoot 'GitHub'
) -BuildSystem GitHubWorkflow

Push-Location ($PSScriptRoot | Split-Path)

New-GitHubWorkflow -Name "Analyze, Test, Tag, and Publish" -On Push, PullRequest, Demand -Job PowerShellStaticAnalysis,
TestPowerShellOnLinux,
TagReleaseAndPublish,
Expand All @@ -17,4 +21,4 @@ New-GitHubWorkflow -On Demand -Name ugit-psa -Job SendPSA -OutputPath .\.github\
"AT_PROTOCOL_APP_PASSWORD" = '${{ secrets.AT_PROTOCOL_APP_PASSWORD }}'
}

Pop-Location
Pop-Location
2 changes: 1 addition & 1 deletion ugit.HelpOut.ps1 → Build/ugit.HelpOut.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#requires -Module HelpOut

Push-Location $PSScriptRoot
Push-Location ($PSScriptRoot | Split-Path)
$ugitLoaded = Get-Module ugit
if (-not $ugitLoaded) {
$ugitLoaded = Get-ChildItem -Recurse -Filter "*.psd1" | Where-Object Name -like 'ugit*' | Import-Module -Name { $_.FullName } -Force -PassThru
Expand Down
8 changes: 5 additions & 3 deletions ugit.PSSVG.ps1 → Build/ugit.PSSVG.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#requires -Module PSSVG

Push-Location ($PSScriptRoot | Split-Path)
$psChevron =
svg.symbol -Id psChevron -Content @(
svg.polygon -Points (@(
Expand All @@ -12,7 +12,7 @@ $psChevron =
) -join ' ')
) -ViewBox 100, 100 -PreserveAspectRatio $false

$assetsPath = Join-Path $PSScriptRoot assets
$assetsPath = Join-Path $pwd assets

if (-not (Test-Path $assetsPath)) {
$null = New-item -ItemType Directory -Path $assetsPath
Expand All @@ -26,4 +26,6 @@ svg -ViewBox 300, 100 @(
SVG.tspan -FontSize .5em -Content 'u'
SVG.tspan -FontSize 1em -Content 'git' -Dx -.25em
) -FontFamily 'serif' -Fill '#4488ff' -FontSize 4em
) -OutputPath (Join-Path $assetsPath ugit.svg)
) -OutputPath (Join-Path $assetsPath ugit.svg)

Pop-Location
2 changes: 1 addition & 1 deletion ugit.Piecemeal.ps1 → Build/ugit.Piecemeal.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#require -Module Piecemeal
Push-Location $PSScriptRoot
Push-Location ($PSScriptRoot | Split-Path | Join-Path -ChildPath "Commands")

Install-Piecemeal -ExtensionModule 'ugit' -ExtensionModuleAlias 'git' -ExtensionNoun 'UGitExtension' -ExtensionTypeName 'ugit.extension' -OutputPath '.\Get-UGitExtension.ps1'

Expand Down
2 changes: 1 addition & 1 deletion ugit.ezout.ps1 → Build/ugit.ezout.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Install-Module EZOut or https://github.com/StartAutomating/EZOut
$myFile = $MyInvocation.MyCommand.ScriptBlock.File
$myModuleName = 'ugit'
$myRoot = $myFile | Split-Path
$myRoot = $myFile | Split-Path | Split-Path
Push-Location $myRoot
$formatting = @(
# Add your own Write-FormatView here,
Expand Down
8 changes: 5 additions & 3 deletions ugit.psa.ps1 → Build/ugit.psa.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $isMergeToMain =
($gitHubEvent.head_commit.message -match "Merge Pull Request #(?<PRNumber>\d+)") -and
$gitHubEvent.ref -in 'refs/heads/main', 'refs/heads/master'


Push-Location ($PSScriptRoot | Split-Path)
$importedModule = Import-Module .\ugit.psd1 -Global -PassThru
$importedModule | Out-Host
$moduleAndVersion = "$($importedModule.Name) $($importedModule.Version)"
Expand All @@ -47,6 +47,8 @@ if ($isMergeToMain -or $isManuallyTriggered) {
} -LinkPattern @{
$importedModule.Name = $importedModule.PrivateData.PSData.ProjectURI
}

Pop-Location
return
}
}

Pop-Location
2 changes: 1 addition & 1 deletion ugit.tests.ps1 → Build/ugit.tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe ugit {
$whatIf |
Should -Belike 'git log -n 1*'
}
it 'Can will not map partially completed parameters' {
it 'Will not map partially completed parameters' {
$whatIf = git commit -am 'Message' -WhatIf
$whatIf |
Should -BeLike "git commit -am*Message*"
Expand Down
Loading

0 comments on commit c3033a2

Please sign in to comment.