-
-
Notifications
You must be signed in to change notification settings - Fork 857
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
Distribute Lemmy via crates.io #1674
Conversation
Could you make this a draft PR until you think its ready to go. |
Dont think I can change that for an existing PR, but i marked it as wip. |
Its a hard button to find, instead of being right above this box like the "Ready for review", they stuck it on the top right sidebar below reviewers. You won't see it now cause I converted it. |
I gave this another try, turns out I only ran into the rate limit because I uploaded too many crates and versions during testing. This time it worked without problems in one go. So I suggest that you review the changes in For the next minor release, we just need to cherry-pick this commit, and I will run the script after you make the release. Or we can integrate it directly into the release script if you dont mind waiting for every Lemmy crate to do a clean build. After doing this manually a few times, we can probably integrate it in CI. I will continue by updating the docs. Edit: or actually I can do the publishing via ci as part of this pr |
I'll wait for the publishing then, it does make sense for that to be done through the CI. |
Okay I integrated it in deploy.sh and .drone.yml so it should be ready. I just dont know whats the best way to test it. |
# Update crate versions for crates.io | ||
for crate in crates/*; do | ||
pushd $crate | ||
# update version of the crate itself (only first occurence) | ||
# https://stackoverflow.com/a/9453461 | ||
sed -i "0,/version = \"$old_tag\"/s//version = \"$new_tag\"/g" Cargo.toml | ||
# update version of lemmy dependencies | ||
sed -i "s/{ version = \"=$old_tag\", path/{ version = \"=$new_tag\", path/g" Cargo.toml | ||
popd | ||
done | ||
# same as above, for the main cargo.toml | ||
sed -i "s/{ version = \"=$old_tag\", path/{ version = \"=$new_tag\", path/g" Cargo.toml | ||
sed -i "s/version = \"$old_tag\"/version = \"$new_tag\"/g" Cargo.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hope this works well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should definitely make an alpha/beta release to test it first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets leave that for v0.12.0
This is a much better way to distribute Lemmy for native (dockerless) installation, as it avoids having to clone the git repository. I already pushed our code to crates.io/crates/lemmy_server. Note that the code there is not an actual RC, but simply the last commit on main (so it definitely shouldnt be used in production yet).
Assuming that you already have postgres and cargo installed and configured, installing Lemmy is as simple as:
Todo:
Contact crates.io support to increase publishing rate limit (we have too many crates)