This is a version checker i have made to get notifications when the infrastructure i run gets a new release on github. For now this only supports: github, semver
Go to file
Martin Slot 4b8cb5812d Updated rust image 2023-05-18 21:42:31 +02:00
application Cleaned up a bit 2022-12-17 17:13:58 +01:00
console Added settings to mail 2022-12-07 08:34:31 +01:00
test_console Added test console 2022-12-12 21:20:29 +01:00
test_utilities Fixed wrongly referenced struct after updating notification api 2022-12-13 14:55:49 +01:00
tests Removed unused TODO 2022-12-12 21:22:00 +01:00
.gitignore Added test console 2022-12-12 21:20:43 +01:00
.woodpecker.yml Updated rust image 2023-05-18 21:42:31 +02:00
Cargo.toml Added a test console 2022-12-10 13:49:05 +01:00
readme.md Added comment about version 2023-05-18 21:19:32 +02:00
sonar-project.properties Testing code coverage 2022-10-01 18:41:05 +02:00

readme.md

What

This is a simple cli program where you can

  1. register what you currently have,
  2. register where the latest version can be found,
  3. and send an email when it changes

for now this only conforms to:

  1. github, with
  2. semver release tags, and
  3. email

but i have some updates to it in my mind in the future.

Pleasee note: right now it will send one mail pr saved current. I am working on merging it to one mail.

How

Create a settings.toml in the same directory as the console:

[database]
connection_string = "version_checker_db"
in_memory = false

[email]
from = "from@address.ltd"
smtp_username = "your_smtp_username"
smtp_password = "your_smtp_password"
smtp_relay = "your_smtp_realy"

Register where to find release tags

./console register origin github gitea go-gitea gitea

Register what you have

./console register current github gitea 1.2.3 mail@domain.tld

And make a request

./console request

This will send an email if the versions differ. Remember to update the version with the checker when you have updated your software.

You can now add it as a cron job, and make a daily request.

Beta

This is still beta. I use it and fixes the bugs when i find them.

Version supported

The only version supported right now is semver, with or without a v prefix. Fx:

  1. 1.2.3 or
  2. v1.2.3

Not all github projects is doing tagging like this, so there is some projects that can't be watched right now.

How to build

There is no releases yet, but clone the repo, cd to the root and run cargo build.

Please notice

  • The binary is named console for now, and will changed in future versions.
  • It will drop a sqlite database in the same folder as the console. This can't be overridden yet (but this is on my todo list to change that)
  • I am new to rust, so the code i produce is not ferris on wheels, but i will get there eventually. My next round of cleanup is going to be on using Result correctly and do proper error handling

Happy hacking!