Compare commits

...

3 commits

Author SHA1 Message Date
90a7483b7c WIP: TUI actor
All checks were successful
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
2024-08-10 18:38:14 +01:00
e34c6e0ef6 fix: Revert "fix: release-plz generated PR changelog"
All checks were successful
Rust / build (push) Successful in 1m23s
Release Please / Release-plz (push) Successful in 15s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
This reverts commit f5a3524cb9.
2024-08-10 18:38:14 +01:00
ForgeJo Action. See: https://git.kemitix.net/kemitix/rust
6c5e1c1a80 chore: release
All checks were successful
ci/woodpecker/pr/cron-docker-builder Pipeline was successful
ci/woodpecker/pr/push-next Pipeline was successful
ci/woodpecker/pr/tag-created Pipeline was successful
ci/woodpecker/pull_request_closed/cron-docker-builder Pipeline was successful
ci/woodpecker/pull_request_closed/push-next Pipeline was successful
ci/woodpecker/pull_request_closed/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 2m56s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
ci/woodpecker/tag/cron-docker-builder Pipeline was successful
ci/woodpecker/tag/push-next Pipeline was successful
ci/woodpecker/tag/tag-created Pipeline was successful
Rust / build (push) Successful in 1m21s
Signed-off-by: ForgeJo Action. See: https://git.kemitix.net/kemitix/rust <action@git.kemitix.net>
2024-08-10 17:23:24 +00:00
8 changed files with 93 additions and 17 deletions

View file

@ -2,6 +2,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## `git-next` - [0.13.5](https://git.kemitix.net/kemitix/git-next/compare/git-next-v0.13.4...git-next-v0.13.5) - 2024-08-10
### Added
- make forge and repo alias more prominent in email
### Fixed
- invalid config section typo in README
## `git-next-forge-github` - [0.13.4](https://git.kemitix.net/kemitix/git-next/compare/git-next-forge-github-v0.13.3...git-next-forge-github-v0.13.4) - 2024-08-08 ## `git-next-forge-github` - [0.13.4](https://git.kemitix.net/kemitix/git-next/compare/git-next-forge-github-v0.13.3...git-next-forge-github-v0.13.4) - 2024-08-08
### Other ### Other

8
Cargo.lock generated
View file

@ -993,7 +993,7 @@ dependencies = [
[[package]] [[package]]
name = "git-next" name = "git-next"
version = "0.13.4" version = "0.13.5"
dependencies = [ dependencies = [
"actix", "actix",
"actix-rt", "actix-rt",
@ -1031,7 +1031,7 @@ dependencies = [
[[package]] [[package]]
name = "git-next-core" name = "git-next-core"
version = "0.13.4" version = "0.13.5"
dependencies = [ dependencies = [
"actix", "actix",
"assert2", "assert2",
@ -1059,7 +1059,7 @@ dependencies = [
[[package]] [[package]]
name = "git-next-forge-forgejo" name = "git-next-forge-forgejo"
version = "0.13.4" version = "0.13.5"
dependencies = [ dependencies = [
"assert2", "assert2",
"async-trait", "async-trait",
@ -1075,7 +1075,7 @@ dependencies = [
[[package]] [[package]]
name = "git-next-forge-github" name = "git-next-forge-github"
version = "0.13.4" version = "0.13.5"
dependencies = [ dependencies = [
"assert2", "assert2",
"async-trait", "async-trait",

View file

@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"] members = ["crates/*"]
[workspace.package] [workspace.package]
version = "0.13.4" version = "0.13.5"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"

View file

@ -0,0 +1 @@
//

View file

@ -0,0 +1,4 @@
//
use git_next_core::message;
message!(Start, "Start the TUI");

View file

@ -0,0 +1,61 @@
//
mod handlers;
pub mod messages;
use std::io::{stderr, Stderr};
use actix::{Actor, Context};
use ratatui::{
crossterm::{
execute,
terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen},
},
prelude::CrosstermBackend,
Terminal,
};
pub struct Tui {
terminal: Option<Terminal<CrosstermBackend<Stderr>>>,
}
impl Actor for Tui {
type Context = Context<Self>;
fn started(&mut self, _ctx: &mut Self::Context) {
match init() {
Ok(terminal) => {
self.terminal.replace(terminal);
}
Err(err) => tracing::error!(?err, "Failed to start terminal UI"),
}
}
fn stopped(&mut self, _ctx: &mut Self::Context) {
if let Err(err) = restore() {
match std::env::consts::OS {
"linux" | "macos" => {
tracing::error!(
?err,
"Failed to restore terminal: Type `reset` to restore terminal"
);
}
"windows" => {
tracing::error!(?err, "Failed to restore terminal: Reopen a new terminal");
}
_ => tracing::error!(?err, "Failed to restore terminal"),
}
}
}
}
fn init() -> std::io::Result<Terminal<CrosstermBackend<Stderr>>> {
execute!(stderr(), EnterAlternateScreen)?;
enable_raw_mode()?;
Terminal::new(CrosstermBackend::new(stderr()))
}
fn restore() -> std::io::Result<()> {
execute!(stderr(), LeaveAlternateScreen)?;
disable_raw_mode()
}

View file

@ -0,0 +1,2 @@
//
mod actor;

View file

@ -1,23 +1,23 @@
[workspace] [workspace]
# Disable git releases for all packages by default # Disable git releases for all packages by default
git_release_enable = true git_release_enable = false
# Disable git tags for all packages by default # Disable git tags for all packages by default
git_tag_enable = true git_tag_enable = false
# set the path of all the crates to the changelog to the root of the repository # set the path of all the crates to the changelog to the root of the repository
changelog_path = "./CHANGELOG.md" changelog_path = "./CHANGELOG.md"
# [[package]] [[package]]
# name = "git-next" name = "git-next"
# # (Optional) Customize the git tag name to remove the `my_main_package` prefix. # (Optional) Customize the git tag name to remove the `my_main_package` prefix.
# git_tag_name = "v{{ version }}" git_tag_name = "v{{ version }}"
#
# # Enable git tags for this package # Enable git tags for this package
# git_tag_enable = true git_tag_enable = true
#
# # Enable git releases for this package # Enable git releases for this package
# git_release_enable = true git_release_enable = true
[changelog] [changelog]
body = """ body = """