Skip to content

Commit

Permalink
bump version 4.1
Browse files Browse the repository at this point in the history
Support 9.0.1.
  • Loading branch information
kakkun61 committed Feb 4, 2021
1 parent 8254120 commit 0182da2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
6 changes: 6 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change log

## 4.1

*2021.02.05*

Support 9.0.1.

## 4.0

*2020.12.31*
Expand Down
6 changes: 3 additions & 3 deletions ghcups.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'ghcups.psm1'

# このモジュールのバージョン番号です。
ModuleVersion = '4.0'
ModuleVersion = '4.1'

# サポートされている PSEditions
# CompatiblePSEditions = @()
Expand Down Expand Up @@ -98,7 +98,7 @@ PrivateData = @{
Tags = @('Haskell', 'GHC', 'PSEdition_Core', 'Windows')

# このモジュールのライセンスの URL。
LicenseUri = 'https://github.com/kakkun61/ghcups/blob/4.0/LICENSE'
LicenseUri = 'https://github.com/kakkun61/ghcups/blob/4.1/LICENSE'

# このプロジェクトのメイン Web サイトの URL。
ProjectUri = 'https://github.com/kakkun61/ghcups'
Expand All @@ -107,7 +107,7 @@ PrivateData = @{
# IconUri = ''

# このモジュールの ReleaseNotes
ReleaseNotes = 'https://github.com/kakkun61/ghcups/blob/4.0/ChangeLog.md'
ReleaseNotes = 'https://github.com/kakkun61/ghcups/blob/4.1/ChangeLog.md'

ExternalModuleDependencies = @('Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility')

Expand Down
13 changes: 13 additions & 0 deletions ghcups.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,16 @@ function Install-Ghc {
7z x "-o$tempDir$fileName.tar" "$tempDir$fileName.tar.xz"
7z x "-o$(Get-GhcupsInstall)" "$tempDir$fileName.tar"

$metas = Get-HashtaleItem 'ghc', $arch (Get-Config "$($MyInvocation.MyCommand.Module.ModuleBase)\version.yaml")
foreach ($meta in $metas) {
if ($meta -eq $Version) {
break
}
if ($meta -is [hashtable] -and $meta['version'] -eq $Version) {
Move-Item -Path "$(Get-GhcupsInstall)\$($meta['directory'])" -Destination "$(Get-GhcupsInstall)\ghc-$($meta['version'])"
}
}

if ($Set) {
Set-Ghc -Name $Version
}
Expand Down Expand Up @@ -402,6 +412,9 @@ function Get-Ghc {
$result.Add($version, @{ 'Supported' = $false; 'Path' = "$(Get-GhcupsInstall)\ghc-$version" })
}
foreach ($version in $supporteds) {
if ($version -is [hashtable]) {
$version = $version['version']
}
if ($null -eq $result[$version]) {
$result.Add($version, @{ 'Supported' = $true; 'Path' = $null })
}
Expand Down
2 changes: 2 additions & 0 deletions version.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
ghc:
x86_64:
- version: '9.0.1'
directory: ghc-9.0.1-x86_64-unknown-mingw32
- '8.10.3'
- '8.10.2'
- '8.10.1'
Expand Down

0 comments on commit 0182da2

Please sign in to comment.