Skip to content
This repository was archived by the owner on Sep 21, 2023. It is now read-only.

feat: Add version response & cli command #53

Merged
merged 4 commits into from
Jun 19, 2023
Merged

feat: Add version response & cli command #53

merged 4 commits into from
Jun 19, 2023

Conversation

Septias
Copy link
Contributor

@Septias Septias commented Jun 17, 2023

closes #41
closes #50

This pr parses every message received for the /version command. Because the msg is loaded then anyway, this creates room for improvements because the msg will be loaded in the respective handlers again atm.

@Septias Septias requested a review from link2xt June 17, 2023 15:45
Copy link
Contributor

@link2xt link2xt left a comment

Choose a reason for hiding this comment

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

A test would be nice to have, especially since it would have caught an env! crash without a review.

@Septias Septias requested a review from link2xt June 18, 2023 10:44
@Septias
Copy link
Contributor Author

Septias commented Jun 18, 2023

The cargo build script now creates the version file for the bot. This way it doesn't panic if it's not run with cargo and the tarball will have the version available as it is copied from the bot-data folder.

@Septias Septias requested a review from link2xt June 18, 2023 20:30
@link2xt
Copy link
Contributor

link2xt commented Jun 18, 2023

Fine code-wise, I'm not approving yet because I want to test this first.

Copy link
Contributor

@link2xt link2xt left a comment

Choose a reason for hiding this comment

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

I pushed a test and a fix commit to this branch

@link2xt
Copy link
Contributor

link2xt commented Jun 19, 2023

@Septias I rebased the branch but now GH displays only the commiter (me) because you don't have your email confirmed with GH.

@link2xt link2xt force-pushed the sk/get_version branch 2 times, most recently from 95f31a3 to 393e3e4 Compare June 19, 2023 00:24
@link2xt
Copy link
Contributor

link2xt commented Jun 19, 2023

Ok, there is a problem introduced in #29 (see comment #29 (comment)) still there. github-bot version fails because addr is not set, even though address and password is definitely not needed to just print the version.

And if you actually set these variables, output of version subcommand on stdout is:

Generated genisis group join QR-code at ./bot-data/genesis_invite_qr.png
Generated 1:1 invite QR-code at ./bot-data/1o1_invite_qr.png
393e3e4

EDIT: fixed this too

@Septias
Copy link
Contributor Author

Septias commented Jun 19, 2023

@Septias I rebased the branch but now GH displays only the commiter (me) because you don't have your email confirmed with GH.

Can we squash merge and just manually add me?

@Septias
Copy link
Contributor Author

Septias commented Jun 19, 2023

Looks good to me, you can merge if you want.

@link2xt link2xt merged commit 841ae0e into main Jun 19, 2023
@link2xt link2xt deleted the sk/get_version branch June 19, 2023 11:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add version subcommand Add a way to get the bot version via Delta Chat for bug reporting
2 participants