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

release.sh: Include haddocks upload for dhall-nix #1852

Merged
merged 3 commits into from
Jun 14, 2020
Merged

Conversation

sjakobi
Copy link
Collaborator

@sjakobi sjakobi commented Jun 13, 2020

Context: #1756

@sjakobi
Copy link
Collaborator Author

sjakobi commented Jun 13, 2020

Note that this is currently untested and my bash skills are rather underdeveloped…

I just got some exercise manually uploading the docs for hnix though: haskell-nix/hnix#538 (comment)

@sjakobi
Copy link
Collaborator Author

sjakobi commented Jun 13, 2020

Side question: Why is dhall the last package that is released in this script? My intuition would have been to put it first to ensure that the Hackage docs builder links the other packages against the latest dhall version.

@Gabriella439
Copy link
Collaborator

@sjakobi: There were two reasons, one of which is no longer applicable:

  • Earlier versions of the script wouldn't clean out the directories of release-related files (e.g. ./dist), so ordering the tree of packages in that way ensured that each package was build against clean versions of its dependencies. This is no longer necessary as the script cleans up after itself

  • Starting with the most downstream packages (e.g. dhall-lsp-server) would catch release-related issues as early as possible in the process before additional packages were published, minimizing the "damage"

@@ -15,6 +15,11 @@ function release {
cabal v1-configure --disable-tests --disable-benchmarks
cabal v1-sdist
cabal upload --publish "dist/${NAME}-${VERSION}.tar.gz"
if [ "${NAME}" = "dhall-nix" ]
then
cabal v2-haddock --builddir=docs --haddock-for-hackage --enable-documentation
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does cabal v1-haddock work for this purpose? The reason I ask is that the cabal v1-* commands work with Cabal's Nix support, which I use on the machine I use to release the packages. If we use the cabal v2-* commands then they need to be run inside of a nix-shell

Copy link
Collaborator

@Gabriella439 Gabriella439 left a comment

Choose a reason for hiding this comment

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

Thank you! 🙂

@sjakobi
Copy link
Collaborator Author

sjakobi commented Jun 14, 2020

I hope it will work… You'll find out, @Gabriel439! ;)

@mergify mergify bot merged commit 7e61552 into master Jun 14, 2020
@mergify mergify bot deleted the sjakobi/docs-upload branch June 14, 2020 10:33
@Gabriella439
Copy link
Collaborator

@sjakobi: Yeah, if anything goes wrong I will submit a follow-up pull request to fix things

@Gabriella439
Copy link
Collaborator

@sjakobi: I can confirm that it worked 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants