Compare commits
8 Commits
fix-bootst
...
issue-221
| Author | SHA1 | Date | |
|---|---|---|---|
|
283f2a6e46
|
|||
|
94637dfbab
|
|||
|
3e26d7057c
|
|||
|
3f710112f3
|
|||
|
34df41b44a
|
|||
|
3897434ef0
|
|||
|
375dba9dd1
|
|||
|
2edd1fb583
|
@@ -14,7 +14,7 @@ variables:
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
.debian:
|
.debian:
|
||||||
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb9:$DOCKER_REV"
|
image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
|
||||||
tags:
|
tags:
|
||||||
- x86_64-linux
|
- x86_64-linux
|
||||||
variables:
|
variables:
|
||||||
@@ -527,15 +527,9 @@ release:windows:
|
|||||||
hlint:
|
hlint:
|
||||||
stage: hlint
|
stage: hlint
|
||||||
extends:
|
extends:
|
||||||
- .alpine:64bit
|
- .debian
|
||||||
before_script:
|
|
||||||
- ./.gitlab/before_script/linux/alpine/install_deps.sh
|
|
||||||
script:
|
script:
|
||||||
- ./.gitlab/script/hlint.sh
|
- curl -sSL https://raw.github.com/ndmitchell/hlint/master/misc/run.sh | sh -s -- -r lib/ test/
|
||||||
variables:
|
|
||||||
GHC_VERSION: "8.10.6"
|
|
||||||
CABAL_VERSION: "3.4.0.0"
|
|
||||||
JSON_VERSION: "0.0.4"
|
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 2 week
|
expire_in: 2 week
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -205,6 +205,11 @@ data ChangeLogOptions = ChangeLogOptions
|
|||||||
|
|
||||||
|
|
||||||
data WhereisCommand = WhereisTool Tool (Maybe ToolVersion)
|
data WhereisCommand = WhereisTool Tool (Maybe ToolVersion)
|
||||||
|
| WhereisBaseDir
|
||||||
|
| WhereisBinDir
|
||||||
|
| WhereisCacheDir
|
||||||
|
| WhereisLogsDir
|
||||||
|
| WhereisConfDir
|
||||||
|
|
||||||
data WhereisOptions = WhereisOptions {
|
data WhereisOptions = WhereisOptions {
|
||||||
directory :: Bool
|
directory :: Bool
|
||||||
@@ -833,7 +838,8 @@ configP = subparser
|
|||||||
|
|
||||||
whereisP :: Parser WhereisCommand
|
whereisP :: Parser WhereisCommand
|
||||||
whereisP = subparser
|
whereisP = subparser
|
||||||
( command
|
(commandGroup "Tools locations:" <>
|
||||||
|
command
|
||||||
"ghc"
|
"ghc"
|
||||||
(WhereisTool GHC <$> info
|
(WhereisTool GHC <$> info
|
||||||
( optional (toolVersionArgument Nothing (Just GHC)) <**> helper )
|
( optional (toolVersionArgument Nothing (Just GHC)) <**> helper )
|
||||||
@@ -868,6 +874,37 @@ whereisP = subparser
|
|||||||
command
|
command
|
||||||
"ghcup"
|
"ghcup"
|
||||||
(WhereisTool GHCup <$> info ( (pure Nothing) <**> helper ) ( progDesc "Get ghcup location" ))
|
(WhereisTool GHCup <$> info ( (pure Nothing) <**> helper ) ( progDesc "Get ghcup location" ))
|
||||||
|
) <|> subparser ( commandGroup "Directory locations:"
|
||||||
|
<>
|
||||||
|
command
|
||||||
|
"basedir"
|
||||||
|
(info (pure WhereisBaseDir <**> helper)
|
||||||
|
( progDesc "Get ghcup base directory location" )
|
||||||
|
)
|
||||||
|
<>
|
||||||
|
command
|
||||||
|
"bindir"
|
||||||
|
(info (pure WhereisBinDir <**> helper)
|
||||||
|
( progDesc "Get ghcup binary directory location" )
|
||||||
|
)
|
||||||
|
<>
|
||||||
|
command
|
||||||
|
"cachedir"
|
||||||
|
(info (pure WhereisCacheDir <**> helper)
|
||||||
|
( progDesc "Get ghcup cache directory location" )
|
||||||
|
)
|
||||||
|
<>
|
||||||
|
command
|
||||||
|
"logsdir"
|
||||||
|
(info (pure WhereisLogsDir <**> helper)
|
||||||
|
( progDesc "Get ghcup logs directory location" )
|
||||||
|
)
|
||||||
|
<>
|
||||||
|
command
|
||||||
|
"confdir"
|
||||||
|
(info (pure WhereisConfDir <**> helper)
|
||||||
|
( progDesc "Get ghcup config directory location" )
|
||||||
|
)
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
whereisGHCFooter = [s|Discussion:
|
whereisGHCFooter = [s|Discussion:
|
||||||
@@ -2136,6 +2173,26 @@ Report bugs at <https://gitlab.haskell.org/haskell/ghcup-hs/issues>|]
|
|||||||
runLogger $ logError $ T.pack $ prettyShow e
|
runLogger $ logError $ T.pack $ prettyShow e
|
||||||
pure $ ExitFailure 30
|
pure $ ExitFailure 30
|
||||||
|
|
||||||
|
Whereis _ WhereisBaseDir -> do
|
||||||
|
putStr baseDir
|
||||||
|
pure ExitSuccess
|
||||||
|
|
||||||
|
Whereis _ WhereisBinDir -> do
|
||||||
|
putStr binDir
|
||||||
|
pure ExitSuccess
|
||||||
|
|
||||||
|
Whereis _ WhereisCacheDir -> do
|
||||||
|
putStr cacheDir
|
||||||
|
pure ExitSuccess
|
||||||
|
|
||||||
|
Whereis _ WhereisLogsDir -> do
|
||||||
|
putStr logsDir
|
||||||
|
pure ExitSuccess
|
||||||
|
|
||||||
|
Whereis _ WhereisConfDir -> do
|
||||||
|
putStr confDir
|
||||||
|
pure ExitSuccess
|
||||||
|
|
||||||
Upgrade uOpts force' -> do
|
Upgrade uOpts force' -> do
|
||||||
target <- case uOpts of
|
target <- case uOpts of
|
||||||
UpgradeInplace -> Just <$> liftIO getExecutablePath
|
UpgradeInplace -> Just <$> liftIO getExecutablePath
|
||||||
|
|||||||
@@ -372,6 +372,13 @@ adjust_bashrc() {
|
|||||||
echo "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
echo "[[ -f ~/.bashrc ]] && source ~/.bashrc # ghcup-env" >> "${HOME}/.bash_profile"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
MSYS*|MINGW*)
|
||||||
|
if [ ! -e "${HOME}/.bash_profile" ] ; then
|
||||||
|
echo '# generated by ghcup' > "${HOME}/.bash_profile"
|
||||||
|
echo 'test -f ~/.profile && . ~/.profile' >> "${HOME}/.bash_profile"
|
||||||
|
echo 'test -f ~/.bashrc && . ~/.bashrc' >> "${HOME}/.bash_profile"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
break ;;
|
break ;;
|
||||||
|
|
||||||
|
|||||||
@@ -413,6 +413,7 @@ if (!(Test-Path -Path ('{0}' -f $MsysDir))) {
|
|||||||
|
|
||||||
Print-Msg -msg 'Setting default home directory...'
|
Print-Msg -msg 'Setting default home directory...'
|
||||||
Exec "$Bash" '-lc' "sed -i -e 's/db_home:.*$/db_home: windows/' /etc/nsswitch.conf"
|
Exec "$Bash" '-lc' "sed -i -e 's/db_home:.*$/db_home: windows/' /etc/nsswitch.conf"
|
||||||
|
|
||||||
} elseif ($msys2Decision -eq 1) {
|
} elseif ($msys2Decision -eq 1) {
|
||||||
Print-Msg -color Yellow -msg 'Skipping MSys2 installation.'
|
Print-Msg -color Yellow -msg 'Skipping MSys2 installation.'
|
||||||
while ($true) {
|
while ($true) {
|
||||||
|
|||||||
Reference in New Issue
Block a user