Files
PSMinIO/Version.ps1
T
PSMinIO Developer 90c64d3237 Major project reorganization: Centralized version management and improved structure
- Reorganized project structure with proper directory separation:
  * All scripts moved to scripts/ directory (including examples)
  * All documentation moved to docs/ directory (except README.md)
  * Centralized version management in Version.ps1

- Implemented centralized version management system:
  * Version.ps1 provides single source of truth for version information
  * Automatic yyyy.MM.dd.HHmm versioning based on build time
  * scripts/Update-Version.ps1 updates all version references
  * src/Properties/AssemblyInfo.cs for assembly version information

- Enhanced build system:
  * scripts/Build.ps1 - Full build with validation and packaging
  * scripts/Quick-Build.ps1 - Fast build handling file locking issues
  * Removed automatic copy from project file to avoid locking
  * Integrated version updates into build process

- Updated PowerShell Gallery publishing:
  * scripts/Publish-PSMinIOToGallery.ps1 updated for new structure
  * docs/POWERSHELL-GALLERY-RELEASE.md comprehensive publishing guide
  * Module manifest updated with proper metadata and release notes

- Updated all documentation and examples:
  * README.md updated with PowerShell Gallery installation
  * All example scripts updated with correct import paths
  * scripts/examples/README.md updated for new location
  * docs/PROJECT-STRUCTURE.md documents new organization

- Version updated to 2025.07.11.1151 with centralized management
- All import paths corrected for new structure
- Professional project organization following PowerShell best practices
2025-07-11 11:53:08 -04:00

136 lines
5.6 KiB
PowerShell

# PSMinIO Version Configuration
# This file contains the centralized version information for the PSMinIO module
# Generate version based on current date and time
$CurrentDate = Get-Date
$Version = $CurrentDate.ToString("yyyy.MM.dd.HHmm")
# Version information
$VersionInfo = @{
# Main version string (yyyy.MM.dd.HHMM format)
Version = $Version
# Semantic version for PowerShell Gallery (converted from date-based)
SemanticVersion = "2.0.0"
# Build date
BuildDate = $CurrentDate
# Build date string
BuildDateString = $CurrentDate.ToString("yyyy-MM-dd HH:mm:ss")
# Copyright year
CopyrightYear = $CurrentDate.Year
# Module information
ModuleName = "PSMinIO"
Author = "Grace Solutions"
CompanyName = "Grace Solutions"
Copyright = "(c) $($CurrentDate.Year) Grace Solutions. All rights reserved."
# Description
Description = "A comprehensive PowerShell module for MinIO object storage operations with enterprise-grade features including chunked transfers, advanced object listing, directory management, and performance monitoring. Built on the official Minio .NET SDK."
# PowerShell Gallery metadata
Tags = @('MinIO', 'ObjectStorage', 'S3', 'Cloud', 'Storage', 'Bucket', 'Object', 'Enterprise', 'Chunked', 'Performance', 'Monitoring', 'Automation', 'Backup', 'AWS', 'Compatible')
# URLs
ProjectUri = "https://github.com/Grace-Solutions/PSMinIO"
LicenseUri = "https://github.com/Grace-Solutions/PSMinIO/blob/main/LICENSE"
# Release notes
ReleaseNotes = @"
## Version $Version - Enhanced Release
### Major Features
- Complete Get-MinIOObject cmdlet with advanced filtering, sorting, and pagination
- Enhanced directory management with automatic nested structure creation
- Advanced chunked operations with configurable chunk sizes and multi-layer progress tracking
- Comprehensive timing and performance metrics for all operations
- Enterprise-grade automation examples and monitoring capabilities
### Issues Fixed
- Fixed directory creation warnings (now clean verbose logging)
- Implemented missing Get-MinIOObject cmdlet with full functionality
- Resolved threading and progress reporting issues
### Documentation and Examples
- Updated README.md and comprehensive USAGE.md documentation
- Created comprehensive example scripts in scripts/examples/ directory
- Added enterprise automation patterns and best practices
- Professional logging with no Write-Host usage
### Technical Improvements
- Thread-safe operations for chunked transfers
- Enhanced error handling and resource management
- Performance optimization with intelligent defaults
- Centralized version management system
This release provides enterprise-grade functionality with professional documentation and comprehensive examples.
"@
}
# Export version information for use by other scripts
$VersionInfo
# Function to get version info
function Get-PSMinIOVersion {
return $VersionInfo
}
# Function to update version in files
function Update-PSMinIOVersion {
param(
[string]$ManifestPath,
[string]$AssemblyInfoPath
)
Write-Host "Updating version to: $($VersionInfo.Version)" -ForegroundColor Green
Write-Host "Build date: $($VersionInfo.BuildDateString)" -ForegroundColor Green
# Update module manifest if path provided
if ($ManifestPath -and (Test-Path $ManifestPath)) {
Write-Host "Updating module manifest: $ManifestPath" -ForegroundColor Yellow
$manifestContent = Get-Content $ManifestPath -Raw
# Update version
$manifestContent = $manifestContent -replace "ModuleVersion\s*=\s*'[^']*'", "ModuleVersion = '$($VersionInfo.Version)'"
# Update copyright
$manifestContent = $manifestContent -replace "Copyright\s*=\s*'[^']*'", "Copyright = '$($VersionInfo.Copyright)'"
# Update description
$manifestContent = $manifestContent -replace "Description\s*=\s*'[^']*'", "Description = '$($VersionInfo.Description)'"
$manifestContent | Set-Content $ManifestPath -Encoding UTF8
Write-Host "✅ Module manifest updated" -ForegroundColor Green
}
# Update assembly info if path provided
if ($AssemblyInfoPath -and (Test-Path $AssemblyInfoPath)) {
Write-Host "Updating assembly info: $AssemblyInfoPath" -ForegroundColor Yellow
$assemblyContent = Get-Content $AssemblyInfoPath -Raw
# Update assembly version attributes
$assemblyContent = $assemblyContent -replace '\[assembly:\s*AssemblyVersion\("[^"]*"\)\]', "[assembly: AssemblyVersion(`"$($VersionInfo.Version)`")]"
$assemblyContent = $assemblyContent -replace '\[assembly:\s*AssemblyFileVersion\("[^"]*"\)\]', "[assembly: AssemblyFileVersion(`"$($VersionInfo.Version)`")]"
$assemblyContent = $assemblyContent -replace '\[assembly:\s*AssemblyInformationalVersion\("[^"]*"\)\]', "[assembly: AssemblyInformationalVersion(`"$($VersionInfo.Version)`")]"
# Update copyright
$assemblyContent = $assemblyContent -replace '\[assembly:\s*AssemblyCopyright\("[^"]*"\)\]', "[assembly: AssemblyCopyright(`"$($VersionInfo.Copyright)`")]"
$assemblyContent | Set-Content $AssemblyInfoPath -Encoding UTF8
Write-Host "✅ Assembly info updated" -ForegroundColor Green
}
}
# Export functions only if running as a module
if ($MyInvocation.MyCommand.CommandType -eq 'ExternalScript') {
# Running as script - don't export
} else {
# Running as module - export functions
Export-ModuleMember -Function Get-PSMinIOVersion, Update-PSMinIOVersion -Variable VersionInfo
}