Skip to content

Commit cf9f037

Browse files
author
Github Actions
committed
Update PSBuild module to version 1.1.0 with enhancements including improved object model using PSCustomObjects, better git status detection, and comprehensive help comments. Added new utility functions and updated documentation to reflect changes.
1 parent 1e2d0b1 commit cf9f037

2 files changed

Lines changed: 38 additions & 3 deletions

File tree

scripts/PSBuild.psd1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@{
22
# Module information
33
RootModule = 'PSBuild.psm1'
4-
ModuleVersion = '1.0.0'
4+
ModuleVersion = '1.1.0'
55
GUID = '15dd2bfc-0f11-4c8a-b98a-f2529558f423'
66
Author = 'ktsu.dev'
77
CompanyName = 'ktsu.dev'
@@ -49,6 +49,8 @@
4949
'Test-AnyFiles',
5050
'Get-GitLineEnding',
5151
'Set-GitIdentity',
52+
'Write-InformationStream',
53+
'Invoke-ExpressionWithLogging',
5254

5355
# High-level workflow functions
5456
'Invoke-BuildWorkflow',
@@ -79,7 +81,15 @@
7981
LicenseUri = 'https://github.com/ktsu-dev/PSBuild/blob/main/LICENSE.md'
8082
ProjectUri = 'https://github.com/ktsu-dev/PSBuild'
8183
ReleaseNotes = @'
82-
Initial release of PSBuild module featuring:
84+
v1.1.0:
85+
- Improved object model using PSCustomObjects instead of hashtables
86+
- Enhanced git status detection and commit handling
87+
- Fixed logging and variable capture issues
88+
- Added comprehensive help comments to all functions
89+
- Added utility functions to the exported functions list
90+
91+
v1.0.0:
92+
- Initial release of PSBuild module featuring:
8393
- Semantic versioning based on git history
8494
- Automatic version calculation from commit analysis
8595
- Metadata file generation and management

scripts/README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ A comprehensive PowerShell module for automating the build, test, package, and r
1111
- NuGet package creation and publishing
1212
- GitHub release creation with assets
1313
- Proper line ending handling based on git config
14-
- Robust version string handling with automatic whitespace trimming
1514

1615
## Installation
1716

@@ -50,6 +49,21 @@ if ($result.Success) {
5049
}
5150
```
5251

52+
## Object Model
53+
54+
The module consistently uses PSCustomObjects for return values and data storage, providing several benefits:
55+
56+
- Easy property access with dot notation
57+
- Better IntelliSense support in modern editors
58+
- Consistent patterns throughout the codebase
59+
- More efficient memory usage
60+
- Clearer code structure
61+
62+
Each function returns a standardized object with at least:
63+
- `Success`: Boolean indicating operation success
64+
- `Error`: Error message if operation failed
65+
- `Data`: Object containing function-specific results
66+
5367
## Managed Files
5468

5569
The module manages several metadata files in your repository:
@@ -136,6 +150,8 @@ The module provides several functions for advanced scenarios:
136150
- `Test-AnyFiles`: Tests for existence of files matching a pattern
137151
- `Get-GitLineEnding`: Determines correct line endings based on git config
138152
- `Set-GitIdentity`: Configures git user identity for automated operations
153+
- `Write-InformationStream`: Streams output to the information stream
154+
- `Invoke-ExpressionWithLogging`: Executes commands with proper logging
139155

140156
## Line Ending Handling
141157

@@ -145,6 +161,15 @@ The module respects git's line ending settings when generating files:
145161
2. Falls back to `core.autocrlf` setting
146162
3. Defaults to OS-specific line endings if no git settings are found
147163

164+
## Git Status Handling
165+
166+
The module carefully handles git status to prevent empty commits:
167+
168+
1. Only attempts commits when there are actual changes
169+
2. Properly captures and interprets the git status output
170+
3. Reports clear status messages during metadata updates
171+
4. Preserves the correct commit hash for both success and no-change scenarios
172+
148173
## Contributing
149174

150175
1. Fork the repository

0 commit comments

Comments
 (0)