Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
ci
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
Iris
ci
Commits
39c267a4
Commit
39c267a4
authored
7 years ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
skip opam upgrade if we are working in a fresh opam root
parent
e5c45351
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
prepare-opam.sh
+14
-8
14 additions, 8 deletions
prepare-opam.sh
with
14 additions
and
8 deletions
prepare-opam.sh
+
14
−
8
View file @
39c267a4
...
...
@@ -12,14 +12,18 @@ else
echo_color
"
$BOLDYELLOW
"
"[prepare-opam] Creating new opam root"
mkdir
"
$OPAMROOT
"
opam init
--no-setup
-y
FRESH_OPAM
=
yes
fi
eval
`
opam conf
env
`
# Make sure the pin for the builddep package exists and is up-to-date
make build-dep/opam
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Make sure the pin for the builddep package exists and is up-to-date.
# This avoids opam complaining about pins pointing to a non-existing file.
make build-dep/opam
# Update repositories
opam update
# Update repositories
opam update
fi
# Make sure we got the right set of repositories registered
if
echo
"
$@
"
| fgrep
"dev"
>
/dev/null
;
then
...
...
@@ -56,10 +60,12 @@ while (( "$#" )); do # while there are arguments left
done
echo
# Upgrade cached things.
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
if
[[
-z
"
$FRESH_OPAM
"
]]
;
then
# skip if this is a fresh opam root
# Upgrade cached things
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Upgrading packages"
opam upgrade
-y
--fixup
&&
opam upgrade
-y
echo
fi
# Install build-dependencies.
echo_color
"
$BOLDGREEN
"
"[prepare-opam] Installing build-dependencies"
...
...
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