Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix webpage revisions #100

Merged
merged 2 commits into from
Jul 11, 2024
Merged

Fix webpage revisions #100

merged 2 commits into from
Jul 11, 2024

Conversation

andreabedini
Copy link
Member

This fixes a bug in the website generation that causes revisions to be duplicated.

E.g.

λ curl --silent https://chap.intersectmbo.org/package/typed-protocols-0.1.1.0/revision/1.cabal | sha256sum
3c1f4b32b2a61df886f146d6fc819d4ccac16d435dce41db420e055061e614e6  -
λ curl --silent https://chap.intersectmbo.org/package/typed-protocols-0.1.1.0/revision/2.cabal | sha256sum
3c1f4b32b2a61df886f146d6fc819d4ccac16d435dce41db420e055061e614e6  -
λ curl --silent https://chap.intersectmbo.org/package/typed-protocols-0.1.1.0/revision/3.cabal | sha256sum
3c1f4b32b2a61df886f146d6fc819d4ccac16d435dce41db420e055061e614e6  -

while

λ sha256sum _sources/typed-protocols/0.1.1.0/revisions/*
3afb8cf577e858150eb2fdc89638c4a88987c1fd0d6332db77b1c69928fd207d  _sources/typed-protocols/0.1.1.0/revisions/1.cabal
8776c5b773e667290edc2b367bfdd6630c559181c37dd43ed3fd33e8ea9fbaa3  _sources/typed-protocols/0.1.1.0/revisions/2.cabal
3c1f4b32b2a61df886f146d6fc819d4ccac16d435dce41db420e055061e614e6  _sources/typed-protocols/0.1.1.0/revisions/3.cabal

Revision number 3 (the latest) was used in place of 1 and 2.

@@ -113,7 +113,7 @@ buildAction

-- all revised cabal files, with their timestamp
revcf <- for (zip [1 :: Int ..] cabalFileRevisions) $ \(revNum, (timestamp, path)) -> do
copyFileChanged cabalFilePath (outputDir </> "package" </> prettyShow pkgId </> "revision" </> show revNum <.> "cabal")
copyFileChanged path (outputDir </> "package" </> prettyShow pkgId </> "revision" </> show revNum <.> "cabal")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooops

@andreabedini andreabedini force-pushed the andrea/fix-webpage-revisions branch from 0024f36 to 155a009 Compare July 11, 2024 05:14
@andreabedini andreabedini merged commit be9e351 into main Jul 11, 2024
3 checks passed
@andreabedini andreabedini deleted the andrea/fix-webpage-revisions branch July 11, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants