Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
ghcup-hs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Haskell
ghcup-hs
Commits
ab44e9d2
Verified
Commit
ab44e9d2
authored
3 years ago
by
Julian Ospald
Browse files
Options
Downloads
Patches
Plain Diff
Add shellcheck check
parent
32497f3a
Branches
mkdocs-ci
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!197
Add mkdocs to CI
Pipeline
#42074
canceled
3 years ago
Stage: checks
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+12
-0
12 additions, 0 deletions
.gitlab-ci.yml
scripts/bootstrap/bootstrap-haskell
+9
-4
9 additions, 4 deletions
scripts/bootstrap/bootstrap-haskell
with
21 additions
and
4 deletions
.gitlab-ci.yml
+
12
−
0
View file @
ab44e9d2
...
@@ -610,3 +610,15 @@ mkdocs:
...
@@ -610,3 +610,15 @@ mkdocs:
script
:
script
:
-
~/.local/bin/mkdocs build
-
~/.local/bin/mkdocs build
allow_failure
:
true
allow_failure
:
true
######## shellcheck ########
shellcheck
:
image
:
"
koalaman/shellcheck-alpine"
tags
:
-
x86_64-linux
stage
:
checks
script
:
-
shellcheck scripts/bootstrap/bootstrap-haskell
allow_failure
:
true
This diff is collapsed.
Click to expand it.
scripts/bootstrap/bootstrap-haskell
+
9
−
4
View file @
ab44e9d2
...
@@ -70,6 +70,7 @@ warn() {
...
@@ -70,6 +70,7 @@ warn() {
else
else
case
"
${
plat
}
"
in
case
"
${
plat
}
"
in
MSYS
*
|
MINGW
*
)
MSYS
*
|
MINGW
*
)
# shellcheck disable=SC3037
echo
-e
"
\\
033[0;35m
$1
\\
033[0m"
echo
-e
"
\\
033[0;35m
$1
\\
033[0m"
;;
;;
*
)
*
)
...
@@ -85,6 +86,7 @@ yellow() {
...
@@ -85,6 +86,7 @@ yellow() {
else
else
case
"
${
plat
}
"
in
case
"
${
plat
}
"
in
MSYS
*
|
MINGW
*
)
MSYS
*
|
MINGW
*
)
# shellcheck disable=SC3037
echo
-e
"
\\
033[0;33m
$1
\\
033[0m"
echo
-e
"
\\
033[0;33m
$1
\\
033[0m"
;;
;;
*
)
*
)
...
@@ -100,6 +102,7 @@ green() {
...
@@ -100,6 +102,7 @@ green() {
else
else
case
"
${
plat
}
"
in
case
"
${
plat
}
"
in
MSYS
*
|
MINGW
*
)
MSYS
*
|
MINGW
*
)
# shellcheck disable=SC3037
echo
-e
"
\\
033[0;32m
$1
\\
033[0m"
echo
-e
"
\\
033[0;32m
$1
\\
033[0m"
;;
;;
*
)
*
)
...
@@ -122,8 +125,10 @@ _eghcup() {
...
@@ -122,8 +125,10 @@ _eghcup() {
args
=
"-s
${
BOOTSTRAP_HASKELL_YAML
}
"
args
=
"-s
${
BOOTSTRAP_HASKELL_YAML
}
"
fi
fi
if
[
-z
"
${
BOOTSTRAP_HASKELL_VERBOSE
}
"
]
;
then
if
[
-z
"
${
BOOTSTRAP_HASKELL_VERBOSE
}
"
]
;
then
# shellcheck disable=SC2086
"
${
GHCUP_BIN
}
/ghcup"
${
args
}
"
$@
"
"
${
GHCUP_BIN
}
/ghcup"
${
args
}
"
$@
"
else
else
# shellcheck disable=SC2086
"
${
GHCUP_BIN
}
/ghcup"
${
args
}
--verbose
"
$@
"
"
${
GHCUP_BIN
}
/ghcup"
${
args
}
--verbose
"
$@
"
fi
fi
}
}
...
@@ -389,7 +394,7 @@ adjust_bashrc() {
...
@@ -389,7 +394,7 @@ adjust_bashrc() {
echo
"set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX
\$
HOME ; set -gx PATH
\$
HOME/.cabal/bin
\$
PATH
$GHCUP_BIN
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
echo
"set -q GHCUP_INSTALL_BASE_PREFIX[1]; or set GHCUP_INSTALL_BASE_PREFIX
\$
HOME ; set -gx PATH
\$
HOME/.cabal/bin
\$
PATH
$GHCUP_BIN
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
;;
;;
esac
esac
break
;;
;;
bash
)
bash
)
sed
-i
-e
'/# ghcup-env$/ s/^#*/#/'
"
${
GHCUP_PROFILE_FILE
}
"
sed
-i
-e
'/# ghcup-env$/ s/^#*/#/'
"
${
GHCUP_PROFILE_FILE
}
"
echo
"[ -f
\"
${
GHCUP_DIR
}
/env
\"
] && source
\"
${
GHCUP_DIR
}
/env
\"
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
echo
"[ -f
\"
${
GHCUP_DIR
}
/env
\"
] && source
\"
${
GHCUP_DIR
}
/env
\"
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
...
@@ -407,12 +412,12 @@ adjust_bashrc() {
...
@@ -407,12 +412,12 @@ adjust_bashrc() {
fi
fi
;;
;;
esac
esac
break
;;
;;
zsh
)
zsh
)
sed
-i
-e
'/# ghcup-env$/ s/^#*/#/'
"
${
GHCUP_PROFILE_FILE
}
"
sed
-i
-e
'/# ghcup-env$/ s/^#*/#/'
"
${
GHCUP_PROFILE_FILE
}
"
echo
"[ -f
\"
${
GHCUP_DIR
}
/env
\"
] && source
\"
${
GHCUP_DIR
}
/env
\"
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
echo
"[ -f
\"
${
GHCUP_DIR
}
/env
\"
] && source
\"
${
GHCUP_DIR
}
/env
\"
# ghcup-env"
>>
"
${
GHCUP_PROFILE_FILE
}
"
break
;;
;;
esac
esac
echo
echo
echo
"==============================================================================="
echo
"==============================================================================="
...
@@ -644,7 +649,7 @@ else
...
@@ -644,7 +649,7 @@ else
fi
fi
echo
echo
echo
"
$(
if
[
-n
"
${
BOOTSTRAP_HASKELL_YAML
}
"
]
;
then
ghcup
-s
"
${
BOOTSTRAP_HASKELL_YAML
}
"
tool-requirements
;
else
ghcup tool-requirements
;
fi
)
"
if
[
-n
"
${
BOOTSTRAP_HASKELL_YAML
}
"
]
;
then
(>
&2
ghcup
-s
"
${
BOOTSTRAP_HASKELL_YAML
}
"
tool-requirements
)
;
else
(>
&2
ghcup tool-requirements
)
;
fi
echo
echo
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
if
[
-z
"
${
BOOTSTRAP_HASKELL_NONINTERACTIVE
}
"
]
;
then
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment