diff --git a/.github/workflows/bump-plutus-version.yml b/.github/workflows/bump-plutus-version.yml index a44f56c..48f4eac 100644 --- a/.github/workflows/bump-plutus-version.yml +++ b/.github/workflows/bump-plutus-version.yml @@ -28,6 +28,8 @@ jobs: - name: Change Plutus Versions run: | + set -o pipefail + PLUTUS_VERSION=${{ github.event.inputs.version }} # Derive hackage index-state from the flake-pinned hackage commit, @@ -36,14 +38,22 @@ jobs: HACKAGE_EPOCH=$((HACKAGE_EPOCH - 7200)) HACKAGE_DATE=$(date -u -d "@$HACKAGE_EPOCH" +"%Y-%m-%dT%H:%M:%SZ") - # For CHaP, use the foliage timestamp of the specific plutus-core version - # being bumped. This is the exact index-state at which the package appears - # in the CHaP index — independent of CHaP's git commit timestamp, which can - # be arbitrarily newer (e.g. ghost automation re-runs with 0 file changes). + # For CHaP, read the index that ships inside the flake-pinned repository: + # the mtimes of the entries in 01-index.tar.gz ARE the index-states, so + # the newest one is the exact latest index-state of the pinned CHaP — + # independent of CHaP's git commit timestamp, which can be arbitrarily + # newer (e.g. ghost automation re-runs with 0 file changes). CHAP_REV=$(jq -r '.nodes.CHaP.locked.rev' flake.lock) - CHAP_DATE=$(gh api \ - "repos/IntersectMBO/cardano-haskell-packages/contents/_sources/plutus-core/${PLUTUS_VERSION}/meta.toml?ref=${CHAP_REV}" \ - --jq '.content' | base64 -d | grep '^timestamp' | awk '{print $3}' | tr -d '"') + CHAP_DATE=$(curl -fsSL \ + "https://raw.githubusercontent.com/IntersectMBO/cardano-haskell-packages/${CHAP_REV}/01-index.tar.gz" \ + | tar -tvz --full-time -f - \ + | grep -oE '[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2}' \ + | sort | tail -1 | sed 's/ /T/;s/$/Z/') + + if [ -z "$CHAP_DATE" ]; then + echo "Failed to determine CHaP index-state" >&2 + exit 1 + fi sed -i "s/\(hackage.haskell.org \).*$/\1$HACKAGE_DATE/" cabal.project sed -i "s/\(cardano-haskell-packages \).*$/\1$CHAP_DATE/" cabal.project diff --git a/cabal.project b/cabal.project index 1c9fdc4..e15e012 100644 --- a/cabal.project +++ b/cabal.project @@ -11,9 +11,9 @@ repository cardano-haskell-packages index-state: -- Bump both the following dates if you need newer packages from Hackage - , hackage.haskell.org 2026-05-22T05:43:37Z + , hackage.haskell.org 2026-07-14T11:13:58Z -- Bump this if you need newer packages from CHaP - , cardano-haskell-packages 2026-05-22T05:43:37Z + , cardano-haskell-packages 2026-07-13T07:20:00Z packages: ./. diff --git a/flake.lock b/flake.lock index 52293fb..7886a13 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "CHaP": { "flake": false, "locked": { - "lastModified": 1779431600, - "narHash": "sha256-BveisGfAV1GBrwP83S5w0D7B1t3VPaoHGGlRcnHYN5E=", + "lastModified": 1784036502, + "narHash": "sha256-v2gJiWwdtng995xg/69wlElHqzUKii8g/6XJDeUNH30=", "owner": "IntersectMBO", "repo": "cardano-haskell-packages", - "rev": "8479db771a3186eb326e42d8480eddc20a208275", + "rev": "c03bfca79b27fab5e4cd64bf7c34eab8055e8bfa", "type": "github" }, "original": { @@ -209,11 +209,11 @@ "hackage": { "flake": false, "locked": { - "lastModified": 1779435264, - "narHash": "sha256-lGelUDkM0BTFTV2+spI6yxSlOqcqOl+o+PLJk6mfiAo=", + "lastModified": 1784034838, + "narHash": "sha256-wJ+usE5HAwQwlSGICfq9wqVW5+nhbKdGs334y/+pdBI=", "owner": "input-output-hk", "repo": "hackage.nix", - "rev": "7e9747c96955a761fbcc62b2e313d7593da8ce42", + "rev": "cf7d693298b545ee537a97524b3bdd95636658c2", "type": "github" }, "original": { diff --git a/plinth-template.cabal b/plinth-template.cabal index cbb8a25..fed74ab 100644 --- a/plinth-template.cabal +++ b/plinth-template.cabal @@ -49,10 +49,10 @@ common plinth-options common plutus-deps build-depends: - , plutus-core ^>=1.65.0.0 - , plutus-ledger-api ^>=1.65.0.0 - , plutus-tx ^>=1.65.0.0 - , plutus-tx-plugin ^>=1.65.0.0 + , plutus-core ^>=1.66.0.0 + , plutus-ledger-api ^>=1.66.0.0 + , plutus-tx ^>=1.66.0.0 + , plutus-tx-plugin ^>=1.66.0.0 library plinth-validators import: plinth-options, plutus-deps