Skip to content

Commit

Permalink
Fixed cache issue during build
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Jan 2, 2024
1 parent c2e4c34 commit 68a9923
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/patch-flakes.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
$file_contents = file_get_contents('./flake.nix');
$new_content_with_ref = preg_replace('/(ihp\.url = \")(.+)(\")/', '$1github:' . $argv[2] . '?ref=' . $argv[1] . '$3', $file_contents);
$new_content_with_ref = preg_replace('/(ihp\.url = \")(.+)(\")/', '$1github:' . $argv[2] . '?ref=' . $argv[1] . '&rev=' . $argv[3] . '$3', $file_contents);
$new_content_with_ref = str_replace("p.ihp", "p.ihp wreq mmark mmark-ext strip-ansi-escape stripe-signature stripe-concepts http-conduit aeson-casing tz tagsoup ihp-zip minio-hs hs-brotli wai-middleware-brotli fakedata jwt ihp-openai ihp-graphql unordered-containers minimorph", $new_content_with_ref);
$new_content_with_ref = str_replace("# Native dependencies, e.g. imagemagick", "nodejs imagemagick elmPackages.elm", $new_content_with_ref);
file_put_contents('./flake.nix', $new_content_with_ref);
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
if: matrix.os != 'ARM64'
- run: |
cd ihp-boilerplate
php ../.github/patch-flakes.php ${{ github.ref }} ${{ github.event.repository.full_name }}
php ../.github/patch-flakes.php ${{ github.ref }} ${{ github.event.repository.full_name }} ${{ github.sha }}
cat flake.nix
mv Makefile Makefile.old
echo 'GHC_OPTIONS+= -rtsopts=all\n.SHELLFLAGS := -eu -o pipefail -c\n\n'|cat - Makefile.old > Makefile
Expand Down

0 comments on commit 68a9923

Please sign in to comment.