I have a script that deploys a Haskell program once a day. It currently does:
cabal update
cabal install --only-dependencies
cabal configure
cabal build
Which ensures it has the latest package index list, upgrades any dependency whose lower bound in the project.cabal
has changed, and builds the code.
However, I'd really like to upgrade any dependency that has a new suitable version.
- I tried adding
--upgrade-dependencies
but that refused to upgrade anything because it would break existing packages. - I tried combining that with
--force-reinstalls
, but it installed a new version oftemplate-haskell
(not a good idea) and things likeQuickCheck
would no longer compile.
What is the right way to upgrade packages automatically?