Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
examples
Commits
d4f830d7
Commit
d4f830d7
authored
Oct 18, 2017
by
Ralf Jung
Browse files
improve 'package already pinned' check
parent
1763e08e
Changes
1
Hide whitespace changes
Inline
Side-by-side
build/opam-ci.sh
View file @
d4f830d7
...
...
@@ -51,10 +51,11 @@ while (( "$#" )); do # while there are arguments left
VERSION
=
"
$1
"
;
shift
# Check if the pin is already set
if
opam pin list | fgrep
"
$PACKAGE
.
$VERSION
"
>
/dev/null
;
then
echo
"[opam-ci]
$PACKAGE
already pinned to
$VERSION
"
PIN
=
$(
opam pin list | egrep
"^
$PACKAGE
\.
"
)
if
[[
"
$(
echo
"
$PIN
"
|
cut
-d
' '
-f
2
)
"
==
"
$KIND
"
&&
"
$(
echo
"
$PIN
"
|
cut
-d
' '
-f
3
)
"
==
"
$VERSION
"
]]
;
then
echo
"[opam-ci]
$PACKAGE
already
$KIND
-pinned to
$VERSION
"
else
echo
"[opam-ci]
P
inning
$PACKAGE
to
$VERSION
"
echo
"[opam-ci]
$KIND
-p
inning
$PACKAGE
to
$VERSION
"
run_and_print opam pin add
-y
-k
"
$KIND
"
"
$PACKAGE
"
"
$VERSION
"
fi
done
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment