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

Generate config docs from lemmy code #102

Merged
merged 24 commits into from
Oct 25, 2021
Merged

Generate config docs from lemmy code #102

merged 24 commits into from
Oct 25, 2021

Conversation

Nutomic
Copy link
Member

@Nutomic Nutomic commented Sep 27, 2021

Followup for LemmyNet/lemmy#1786. Works fine locally.

build.sh Outdated
pushd lemmy
mkdir ../generated
cargo run -- --print-config-docs >> ../generated/config.hjson
# replace // comments with #
Copy link

Choose a reason for hiding this comment

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

fyi, I've created issues to make all three of those options configurable; will re-ping you once they are implemented :-)

Copy link
Member

Choose a reason for hiding this comment

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

Nice, thanks!

@dessalines
Copy link
Member

This still needs to be fixed for the CI.

@Nutomic
Copy link
Member Author

Nutomic commented Oct 13, 2021

Updated. We also need to update the submodule before deploying, using git submodule update --recursive --remote (not sure which params are required but it works).

Edit: i cant get the ci working, git submodule keeps failing with the same error, no matter what i do:

Submodule 'lemmy' (https://github.com/LemmyNet/lemmy.git) registered for path 'lemmy'
Cloning into '/drone/src/lemmy'...
fatal: Needed a single revision
Unable to find current origin/master revision in submodule path 'lemmy'

@dessalines
Copy link
Member

Add the fetch submodule step not in the build script, but in a drone task like you see with joinlemmy

"publicKeyPem": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA9JJ7Ybp/H7iXeLkWFepg\ny4PHyIXY1TO9rK3lIBmAjNnkNywyGXMgUiiVhGyN9yU7Km8aWayQsNHOkPL7wMZK\nnY2Q+CTQv49kprEdcDVPGABi6EbCSOcRFVaUjjvRHf9Olod2QP/9OtX0oIFKN2KN\nPIUjeKK5tw4EWB8N1i5HOuOjuTcl2BXSemCQLAlXerLjT8xCarGi21xHPaQvAuns\nHt8ye7fUZKPRT10kwDMapjQ9Tsd+9HeBvNa4SDjJX1ONskNh2j4bqHHs2WUymLpX\n1cgf2jmaXAsz6jD9u0wfrLPelPJog8RSuvOzDPrtwX6uyQOl5NK00RlBZwj7bMDx\nzwIDAQAB\n-----END PUBLIC KEY-----\n"
}
}
{{#include ../../../lemmy/crates/apub/assets/lemmy-community.json}}
Copy link
Member Author

Choose a reason for hiding this comment

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

These example files all include the full context which is rather long. Might be good to remove that somehow before including.

@Nutomic
Copy link
Member Author

Nutomic commented Oct 22, 2021

This is finished. Lets merge it, and then publish a new version of joinlemmy, cause we have procrastinated that far too long. We should update the submodule to include LemmyNet/lemmy#1860 before publishing.

@dessalines
Copy link
Member

dessalines commented Oct 22, 2021

I'm of the opinion that we should just link to these source files, instead of pulling in a submodule.

Because look at all of join-lemmy's submodules. Joinlemmy needs to pull in lemmy-docs, which itself now would pull in lemmy. This tree could start getting complicated pretty fast.

   1   │ [submodule "lemmy-docs"]
   2   │     path = lemmy-docs
   3   │     url = https://github.com/lemmynet/lemmy-docs
   4   │     branch = main
   5   │ [submodule "joinlemmy-translations"]
   6   │     path = joinlemmy-translations
   7   │     url = https://github.com/lemmynet/joinlemmy-translations
   8   │     branch = main
   9   │ [submodule "lemmy-translations"]
  10   │     path = lemmy-translations
  11   │     url = https://github.com/lemmynet/lemmy-translations
  12   │     branch = main
  13   │ [submodule "lemmy-instance-stats"]
  14   │     path = lemmy-instance-stats
  15   │     url = https://github.com/LemmyNet/lemmy-instance-stats
  16   │     branch = main
  17   │ [submodule "lemmy-js-client"]
  18   │     path = lemmy-js-client
  19   │     url = https://github.com/LemmyNet/lemmy-js-client
  20   │     branch = main

@Nutomic
Copy link
Member Author

Nutomic commented Oct 25, 2021

Okay updated

@dessalines dessalines merged commit 06a3da7 into main Oct 25, 2021
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.

3 participants