[build] update-cabal-project index variable, fix hash

parent 1c618c02
......@@ -4,6 +4,7 @@ set -euxo pipefail
DEFAULT_STORE=$HOME/.cabal
STORE_DIR="${1:-$DEFAULT_STORE}"
INDEX_STATE="2023-12-04T09:05:40Z"
# README!
# Every time you modify the `stack.yaml` and as result the relevant `cabal.project`
......@@ -11,18 +12,18 @@ STORE_DIR="${1:-$DEFAULT_STORE}"
# `expected_cabal_project_freeze_hash` with the
# `sha256sum` result calculated on the `cabal.project` and `cabal.project.freeze`.
# This ensures the files stay deterministic so that CI cache can kick in.
expected_cabal_project_hash="69e03370a602f40243373515ff884a2cd50dc02eb6f52cd23ba9016a61fe8069"
expected_cabal_project_hash="fff9a998b8159237bed4e83ba2bc9927c300d73dcb568cbf5c611f1538ee12d9"
expected_cabal_project_freeze_hash="796f0109611f3381278b1885ae1fa257c4177b99885eb04701938f1107c06ee5"
cabal --store-dir=$STORE_DIR v2-update 'hackage.haskell.org,2023-11-23T20:05:40Z'
cabal --store-dir=$STORE_DIR v2-update "hackage.haskell.org,${INDEX_STATE}"
# Install stack2cabal if it can't be found.
if ! stack2cabal --help &> /dev/null
then
echo "stack2cabal could not be found"
cabal --store-dir=$STORE_DIR v2-install --index-state="2023-11-23T20:05:40Z" stack2cabal-1.0.14 --overwrite-policy=always
cabal --store-dir=$STORE_DIR v2-install --index-state="${INDEX_STATE}" stack2cabal-1.0.14 --overwrite-policy=always
fi
stack2cabal --no-run-hpack -p '2023-11-23 20:05:40'
stack2cabal --no-run-hpack -p "${INDEX_STATE}"
actual_cabal_project_hash=$(sha256sum cabal.project | awk '{printf "%s",$1}')
actual_cabal_project_freeze_hash=$(sha256sum cabal.project.freeze | awk '{printf "%s",$1}')
......
-- Generated by stack2cabal
index-state: 2023-11-23T20:05:40Z
index-state: 2023-12-04T00:00:00Z
with-compiler: ghc-8.10.7
......@@ -124,7 +124,7 @@ source-repository-package
source-repository-package
type: git
location: https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude
tag: 5a8dc3a0a1a4774ec2eb9df5f0f0b0a7dd172f09
tag: fec7427ba8d1047fd68207afb79139f9dea339e0
source-repository-package
type: git
......
......@@ -22,7 +22,7 @@ allow-newer: true
extra-deps:
- git: https://gitlab.iscpif.fr/gargantext/haskell-gargantext-prelude
commit: 5a8dc3a0a1a4774ec2eb9df5f0f0b0a7dd172f09
commit: fec7427ba8d1047fd68207afb79139f9dea339e0
- git: https://gitlab.iscpif.fr/gargantext/iso639.git
commit: eab929d106833ded8011a0d6705135e3fc506a9c
- git: https://gitlab.iscpif.fr/gargantext/gargantext-graph.git
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment