Skip to content

Commit 1485941

Browse files
committed
Fix the module versioning
1 parent eec2777 commit 1485941

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

build.psm1

-16
Original file line numberDiff line numberDiff line change
@@ -119,22 +119,6 @@ function Start-Build
119119
Write-Host "`n[Build the AIShell module ...]`n" -ForegroundColor Green
120120
$aish_module_csproj = GetProjectFile $module_dir
121121
dotnet publish $aish_module_csproj -c $Configuration -o $module_out_dir
122-
123-
# Update version for the module manifest file.
124-
$projectUrl = 'https://github.com/PowerShell/ProjectMercury'
125-
$version = (Get-Item $module_out_dir/AIShell.Integration.dll).VersionInfo.ProductVersion
126-
$privateData = "PrivateData = @{ PSData = @{ ProjectUri = '$projectUrl' } }"
127-
if ($version -match "(.*)-(.*)") {
128-
$version = $matches[1]
129-
$prerelease = $matches[2]
130-
# Put the prerelease tag in private data.
131-
$privateData = "PrivateData = @{ PSData = @{ Prerelease = '$prerelease'; ProjectUri = '$projectUrl' } }"
132-
}
133-
134-
$moduleManifest = Get-Content $module_out_dir/AIShell.psd1 -Raw
135-
$moduleManifest = $moduleManifest -replace "ModuleVersion = '.*'", "ModuleVersion = '$version'"
136-
$moduleManifest = $moduleManifest -replace "}", " ${privateData}`n}`n"
137-
Set-Content -Path $module_out_dir/AIShell.psd1 -Value $moduleManifest -NoNewline
138122
}
139123

140124
if ($LASTEXITCODE -eq 0) {

shell/AIShell.Integration/AIShell.psd1

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
@{
22
RootModule = 'AIShell.psm1'
33
NestedModules = @("AIShell.Integration.dll")
4-
ModuleVersion = '0.1.0'
4+
ModuleVersion = '1.0.1'
55
GUID = 'ECB8BEE0-59B9-4DAE-9D7B-A990B480279A'
66
Author = 'Microsoft Corporation'
77
CompanyName = 'Microsoft Corporation'
@@ -13,4 +13,5 @@
1313
VariablesToExport = '*'
1414
AliasesToExport = @('aish', 'askai', 'fixit')
1515
HelpInfoURI = 'https://aka.ms/aishell-help'
16+
PrivateData = @{ PSData = @{ Prerelease = 'preview1'; ProjectUri = 'https://github.com/PowerShell/ProjectMercury' } }
1617
}

0 commit comments

Comments
 (0)