Compare commits

...

6 Commits

Author SHA1 Message Date
3d10f964c6 Bump version to 0.1.3 2020-04-15 15:42:09 +02:00
404038edcb Fix boolean check in upgradeGHCup :) 2020-04-15 15:37:29 +02:00
ea4f9ceab1 Update download info 2020-04-15 15:37:01 +02:00
5c481ea94e Small travis adjustment 2020-04-15 15:36:03 +02:00
1ccaf4ba91 Update ghcup downloads 2020-04-15 15:12:21 +02:00
b532511cd5 Use local ghcup-*.json in travis 2020-04-15 15:07:37 +02:00
7 changed files with 51 additions and 44 deletions

View File

@@ -10,6 +10,9 @@ ecabal() {
cabal --store-dir="$(pwd)"/.store "$@" cabal --store-dir="$(pwd)"/.store "$@"
} }
eghcup() {
ghcup -v -c -s file://$(pwd)/ghcup-${JSON_VERSION}.json "$@"
}
# build # build
ecabal update ecabal update
@@ -32,27 +35,27 @@ rm -rf "${GHCUP_INSTALL_BASE_PREFIX}"/.ghcup
ghcup-gen check -f ghcup-${JSON_VERSION}.json ghcup-gen check -f ghcup-${JSON_VERSION}.json
ghcup numeric-version eghcup numeric-version
ghcup -v -c install ${GHC_VERSION} eghcup install ${GHC_VERSION}
ghcup -v -c set ${GHC_VERSION} eghcup set ${GHC_VERSION}
ghcup -v -c install-cabal eghcup install-cabal
cabal --version cabal --version
ghcup -v -c debug-info eghcup debug-info
ghcup -v -c list eghcup list
ghcup -v -c list -t ghc eghcup list -t ghc
ghcup -v -c list -t cabal eghcup list -t cabal
ghc --version ghc --version
ghci --version ghci --version
ghc-$(ghc --numeric-version) --version ghc-$(ghc --numeric-version) --version
ghci-$(ghc --numeric-version) --version ghci-$(ghc --numeric-version) --version
ghcup -v upgrade eghcup rm $(ghc --numeric-version)
ghcup -v upgrade -f
ghcup -v rm $(ghc --numeric-version) eghcup upgrade
eghcup upgrade -f

View File

@@ -1,5 +1,9 @@
# Revision history for ghcup # Revision history for ghcup
## 0.1.3 -- 2020-04-15
* Fix lesser bug when skipping ghcup update
## 0.1.2 -- 2020-04-15 ## 0.1.2 -- 2020-04-15
* Fix bug when removing the set GHC version * Fix bug when removing the set GHC version

View File

@@ -984,32 +984,32 @@ cabal_3200_64_darwin = DownloadInfo
------------- -------------
ghcup_011_32_linux :: DownloadInfo ghcup_012_32_linux :: DownloadInfo
ghcup_011_32_linux = DownloadInfo ghcup_012_32_linux = DownloadInfo
[uri|https://downloads.haskell.org/ghcup/0.1.1/i386-linux-ghcup-0.1.1|] [uri|https://downloads.haskell.org/~ghcup/0.1.2/i386-linux-ghcup-0.1.2|]
Nothing Nothing
"f576f22efdcf17fa18189b65d70e596d14f2347ef549a00592ef28d529c7d5a0" "a1b3f1b62798a2b1162e7433530e697292b87a9255516d8a08e07f0708a72550"
ghcup_011_64_linux :: DownloadInfo ghcup_012_64_linux :: DownloadInfo
ghcup_011_64_linux = DownloadInfo ghcup_012_64_linux = DownloadInfo
[uri|https://downloads.haskell.org/ghcup/0.1.1/x86_64-linux-ghcup-0.1.1|] [uri|https://downloads.haskell.org/~ghcup/0.1.2/x86_64-linux-ghcup-0.1.2|]
Nothing Nothing
"2789fbab2848e4dfd77406b9a710c925b3b9680ac0f8486caca190628646486f" "ef8b39bacce3661efc63d43d0a926b6803497e01c13afbea3947a6d320ecacbf"
ghcup_011_64_freebsd :: DownloadInfo ghcup_012_64_freebsd :: DownloadInfo
ghcup_011_64_freebsd = DownloadInfo ghcup_012_64_freebsd = DownloadInfo
[uri|https://downloads.haskell.org/ghcup/0.1.1/x86_64-portbld-freebsd-ghcup-0.1.1|] [uri|https://downloads.haskell.org/~ghcup/0.1.2/x86_64-portbld-freebsd-ghcup-0.1.2|]
Nothing Nothing
"1336585b15692d6458edf4d913fd585d9963a708e2c952a71ee1ad3400ed2163" "03407b869a860c5f6fb0b94436a4dd17f0d2937a3b6fa348f2a71f64b1daba82"
ghcup_011_64_darwin10_13 :: DownloadInfo ghcup_012_64_darwin10_13 :: DownloadInfo
ghcup_011_64_darwin10_13 = DownloadInfo ghcup_012_64_darwin10_13 = DownloadInfo
[uri|https://downloads.haskell.org/ghcup/0.1.1/x86_64-apple-darwin-ghcup-0.1.1|] [uri|https://downloads.haskell.org/~ghcup/0.1.2/x86_64-apple-darwin-ghcup-0.1.2|]
Nothing Nothing
"b9694de40134e3d17611749eba94d8e4d00a84e2a16bb2409eab1e87f810dacd" "bea293d4a0475f853284d3bf4790565fa270922c8dae60730490dd3753a6ad63"
@@ -1877,18 +1877,18 @@ ghcupDownloads = M.fromList
) )
, ( GHCup , ( GHCup
, M.fromList , M.fromList
[ ( [vver|0.1.1|] [ ( [vver|0.1.2|]
, VersionInfo [Recommended, Latest] Nothing $ M.fromList , VersionInfo [Recommended, Latest] Nothing $ M.fromList
[ ( A_64 [ ( A_64
, M.fromList , M.fromList
[ (Linux UnknownLinux, M.fromList [(Nothing, ghcup_011_64_linux)]) [ (Linux UnknownLinux, M.fromList [(Nothing, ghcup_012_64_linux)])
, (Darwin, M.fromList [(Nothing, ghcup_011_64_darwin10_13)]) , (Darwin, M.fromList [(Nothing, ghcup_012_64_darwin10_13)])
, (FreeBSD, M.fromList [(Nothing, ghcup_011_64_freebsd)]) , (FreeBSD, M.fromList [(Nothing, ghcup_012_64_freebsd)])
] ]
) )
, ( A_32 , ( A_32
, M.fromList , M.fromList
[(Linux UnknownLinux, M.fromList [(Nothing, ghcup_011_32_linux)])] [(Linux UnknownLinux, M.fromList [(Nothing, ghcup_012_32_linux)])]
) )
] ]
) )

View File

@@ -2113,37 +2113,37 @@
} }
}, },
"GHCup": { "GHCup": {
"0.1.1": { "0.1.2": {
"viArch": { "viArch": {
"A_64": { "A_64": {
"FreeBSD": { "FreeBSD": {
"unknown_versioning": { "unknown_versioning": {
"dlHash": "1336585b15692d6458edf4d913fd585d9963a708e2c952a71ee1ad3400ed2163", "dlHash": "03407b869a860c5f6fb0b94436a4dd17f0d2937a3b6fa348f2a71f64b1daba82",
"dlSubdir": null, "dlSubdir": null,
"dlUri": "https://downloads.haskell.org/ghcup/0.1.1/x86_64-portbld-freebsd-ghcup-0.1.1" "dlUri": "https://downloads.haskell.org/~ghcup/0.1.2/x86_64-portbld-freebsd-ghcup-0.1.2"
} }
}, },
"Darwin": { "Darwin": {
"unknown_versioning": { "unknown_versioning": {
"dlHash": "b9694de40134e3d17611749eba94d8e4d00a84e2a16bb2409eab1e87f810dacd", "dlHash": "bea293d4a0475f853284d3bf4790565fa270922c8dae60730490dd3753a6ad63",
"dlSubdir": null, "dlSubdir": null,
"dlUri": "https://downloads.haskell.org/ghcup/0.1.1/x86_64-apple-darwin-ghcup-0.1.1" "dlUri": "https://downloads.haskell.org/~ghcup/0.1.2/x86_64-apple-darwin-ghcup-0.1.2"
} }
}, },
"Linux_UnknownLinux": { "Linux_UnknownLinux": {
"unknown_versioning": { "unknown_versioning": {
"dlHash": "2789fbab2848e4dfd77406b9a710c925b3b9680ac0f8486caca190628646486f", "dlHash": "ef8b39bacce3661efc63d43d0a926b6803497e01c13afbea3947a6d320ecacbf",
"dlSubdir": null, "dlSubdir": null,
"dlUri": "https://downloads.haskell.org/ghcup/0.1.1/x86_64-linux-ghcup-0.1.1" "dlUri": "https://downloads.haskell.org/~ghcup/0.1.2/x86_64-linux-ghcup-0.1.2"
} }
} }
}, },
"A_32": { "A_32": {
"Linux_UnknownLinux": { "Linux_UnknownLinux": {
"unknown_versioning": { "unknown_versioning": {
"dlHash": "f576f22efdcf17fa18189b65d70e596d14f2347ef549a00592ef28d529c7d5a0", "dlHash": "a1b3f1b62798a2b1162e7433530e697292b87a9255516d8a08e07f0708a72550",
"dlSubdir": null, "dlSubdir": null,
"dlUri": "https://downloads.haskell.org/ghcup/0.1.1/i386-linux-ghcup-0.1.1" "dlUri": "https://downloads.haskell.org/~ghcup/0.1.2/i386-linux-ghcup-0.1.2"
} }
} }
} }

View File

@@ -1,6 +1,6 @@
cabal-version: 3.0 cabal-version: 3.0
name: ghcup name: ghcup
version: 0.1.2 version: 0.1.3
synopsis: ghc toolchain installer as an exe/library synopsis: ghc toolchain installer as an exe/library
description: description:
A rewrite of the shell script ghcup, for providing A rewrite of the shell script ghcup, for providing

View File

@@ -692,7 +692,7 @@ upgradeGHCup :: ( MonadMask m
upgradeGHCup dls mtarget force = do upgradeGHCup dls mtarget force = do
lift $ $(logInfo) [i|Upgrading GHCup...|] lift $ $(logInfo) [i|Upgrading GHCup...|]
let latestVer = fromJust $ getLatest dls GHCup let latestVer = fromJust $ getLatest dls GHCup
when (not force && (latestVer < pvpToVersion ghcUpVer)) $ throwE NoUpdate when (not force && (latestVer <= pvpToVersion ghcUpVer)) $ throwE NoUpdate
pfreq <- liftE platformRequest pfreq <- liftE platformRequest
dli <- lE $ getDownloadInfo GHCup latestVer pfreq dls dli <- lE $ getDownloadInfo GHCup latestVer pfreq dls
tmp <- lift withGHCupTmpDir tmp <- lift withGHCupTmpDir

View File

@@ -14,4 +14,4 @@ ghcupURL :: URI
ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.1.json|] ghcupURL = [uri|https://www.haskell.org/ghcup/data/ghcup-0.0.1.json|]
ghcUpVer :: PVP ghcUpVer :: PVP
ghcUpVer = [pver|0.1.2|] ghcUpVer = [pver|0.1.3|]