Compare commits

...

6 commits

Author SHA1 Message Date
0656784d41 chore: Release 0.12.1
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-07-29 08:19:19 +01:00
5dc0de8a05 chore: remove deprecated crates
Some checks failed
Rust / build (push) Failing after 4s
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-07-29 08:18:53 +01:00
bf12712bca chore: update create publishing command
All checks were successful
Rust / build (push) Successful in 2m3s
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-07-29 08:17:48 +01:00
b7abe949e2 fix: make default server config example valid
All checks were successful
Rust / build (push) Successful in 1m29s
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
Included some comments to help configure the file.

Closes kemitix/git-next#115
2024-07-29 08:16:16 +01:00
e56d6a3ebb fix: remove requirement for RUSTFLAGS to be set
All checks were successful
Rust / build (push) Successful in 1m23s
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
Closes kemitix/git-next#116
2024-07-29 08:07:39 +01:00
691a733fc3 fix: webhook secret doesn't need to be base64 encoded
All checks were successful
Rust / build (push) Successful in 1m29s
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
Closes kemitix/git-next#118
2024-07-29 07:51:09 +01:00
9 changed files with 58 additions and 48 deletions

View file

@ -4,8 +4,6 @@ linker = "/usr/bin/clang-16"
rustflags = [
"-C",
"link-arg=--ld-path=/usr/bin/mold",
"--cfg",
"tokio_unstable",
]
[profile.dev]
@ -14,4 +12,3 @@ strip = "debuginfo"
[env]
RUST_LOG = "hyper=warn,git_url_parse=warn,debug"
RUSTFLAGS = "--cfg tokio_unstable"

View file

@ -2,8 +2,23 @@
All notable changes to this project will be documented in this file.
## [0.12.1] - 2024-07-29
### Bug Fixes
- Webhook secret doesn't need to be base64 encoded ([691a733](https://git.kemitix.net/kemitix/git-next/commit/691a733fc37cfba5d9be72b57e24c5b9d3c1218a))
- Remove requirement for RUSTFLAGS to be set ([e56d6a3](https://git.kemitix.net/kemitix/git-next/commit/e56d6a3ebbb4b4bfcaacc986269ba898ffbd1bc6))
- Make default server config example valid ([b7abe94](https://git.kemitix.net/kemitix/git-next/commit/b7abe949e2067e1c3663d45a520385d967f19af8))
### Miscellaneous Tasks
- Update create publishing command ([bf12712](https://git.kemitix.net/kemitix/git-next/commit/bf12712bcaaefe6ae7da113e03b739b42d860fcf))
- Remove deprecated crates ([5dc0de8](https://git.kemitix.net/kemitix/git-next/commit/5dc0de8a05d610c3a5b7be00aac1033763a76949))
## [0.12.0] - 2024-07-28
[656ec4a](https://git.kemitix.net/kemitix/git-next/commit/656ec4a534b5b55ddceb05eee6ed610207ac33d4)...[b89431b](https://git.kemitix.net/kemitix/git-next/commit/b89431b7798dec0ab80010d76327bef89b94eeb0)
### Bug Fixes
- Don't log content of internal messages ([3ae1132](https://git.kemitix.net/kemitix/git-next/commit/3ae113212af3ee43f36383a22984e03e3f44f3f2))
@ -23,6 +38,7 @@ All notable changes to this project will be documented in this file.
- Remove deprecated crates ([5a595ec](https://git.kemitix.net/kemitix/git-next/commit/5a595ec9eed77cf961f01c671c69ca2bc7988092))
- Bump gix from 0.63 to 0.64 ([b24675d](https://git.kemitix.net/kemitix/git-next/commit/b24675d48a3e35a9d780a7f7f8cbfb1477765a7b))
- Bump mockall from 0.12 to 0.13 ([22faa85](https://git.kemitix.net/kemitix/git-next/commit/22faa851dcdd99451c736290bc17b17cbe6aa55c))
- Release 0.12.0 ([b89431b](https://git.kemitix.net/kemitix/git-next/commit/b89431b7798dec0ab80010d76327bef89b94eeb0))
### Refactor

View file

@ -3,7 +3,7 @@ resolver = "2"
members = ["crates/*"]
[workspace.package]
version = "0.12.0" # Update git-next-* under workspace.dependencies
version = "0.12.1" # Update git-next-* under workspace.dependencies
edition = "2021"
license = "MIT"
@ -26,19 +26,10 @@ git-next-core = { path = "crates/core", version = "0.12" }
git-next-forge-forgejo = { path = "crates/forge-forgejo", version = "0.12" }
git-next-forge-github = { path = "crates/forge-github", version = "0.12" }
# remove after 0.12.0
git-next-server = { path = "crates/server", version = "0.12" }
git-next-server-actor = { path = "crates/server-actor", version = "0.12" }
git-next-forge = { path = "crates/forge", version = "0.12" }
git-next-repo-actor = { path = "crates/repo-actor", version = "0.12" }
git-next-webhook-actor = { path = "crates/webhook-actor", version = "0.12" }
git-next-file-watcher-actor = { path = "crates/file-watcher-actor", version = "0.12" }
# CLI parsing
clap = { version = "4.5", features = ["cargo", "derive"] }
# logging
console-subscriber = "0.3"
tracing = "0.1"
tracing-subscriber = "0.3"

View file

@ -29,7 +29,6 @@ clap = { workspace = true }
kxio = { workspace = true }
# logging
console-subscriber = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

View file

@ -39,7 +39,9 @@ async fn send_webhook(
tracing::warn!("Invalid notification configuration (config) - can't sent notification");
return;
};
let Ok(webhook) = Webhook::new(webhook_config.secret().expose_secret()) else {
let Ok(webhook) =
Webhook::from_bytes(webhook_config.secret().expose_secret().as_bytes().into())
else {
tracing::warn!("Invalid notification configuration (signer) - can't sent notification");
return;
};

View file

@ -11,7 +11,7 @@ use actor::ServerActor;
use git_next_core::git::RepositoryFactory;
use kxio::{fs::FileSystem, network::Network};
use tracing::{info, level_filters::LevelFilter};
use tracing::info;
use std::path::PathBuf;
@ -68,20 +68,16 @@ pub fn start(
}
pub fn init_logging() {
use tracing_subscriber::prelude::*;
use tracing_subscriber::EnvFilter;
use tracing::Level;
use tracing_subscriber::FmtSubscriber;
let subscriber = tracing_subscriber::fmt::layer()
let subscriber = FmtSubscriber::builder()
.with_target(false)
.with_file(true)
.with_line_number(true)
.with_filter(
EnvFilter::builder()
.with_default_directive(LevelFilter::INFO.into())
.from_env_lossy(),
);
tracing_subscriber::registry()
.with(console_subscriber::ConsoleLayer::builder().spawn())
.with(subscriber)
.init();
.with_max_level(Level::INFO)
.finish();
#[allow(clippy::expect_used)]
tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");
}

View file

@ -1,25 +1,26 @@
[http]
[http] # where to listen for incoming updates from forges
addr = "0.0.0.0"
port = 8080
[webhook]
[webhook] # where forge should send updates to - should be route to 'http.addr:http.port' above (e.g. using a reverse proxy)
url = "https://localhost:8080" # don't include any query path or a trailing slash
[storage]
[notification] # where updates from git-next should be sent to alert the user
type = "None"
# type = "Webhook"
# webhook = { url = "https//localhost:9090", secret = "secret-password" }
[storage] # where local copies of repositories will be cloned (bare) into
path = "./data"
[notifications]
type = "WebHook"
webhook = { url = "https://localhost:9090" }
[forge] # the forges to connect to
[forge]
[forge.default]
forge_type = "ForgeJo"
hostname = "git.example.net"
user = "git-next" # the user to perform actions as
token = "API-Token"
[forge.default.repos]
hello = { repo = "user/hello", branch = "main", gitdir = "/opt/git/projects/user/hello.git" } # maps to https://git.example.net/user/hello on the branch 'main'
world = { repo = "user/world", branch = "master", main = "master", next = "upcoming", "dev" = "develop" } # maps to the 'master' branch
# [forge.default]
# forge_type = "ForgeJo"
# hostname = "git.example.net"
# user = "bob" # the user to perform actions as
# token = "API-Token"
#
# [forge.default.repos] # the repos at the forge to manage
# hello = { repo = "bob/hello", branch = "main", gitdir = "/opt/git/projects/bob/hello.git" }
# world = { repo = "bob/world", branch = "master", main = "master", next = "upcoming", "dev" = "develop" }

View file

@ -13,7 +13,6 @@ github = []
[dependencies]
# logging
console-subscriber = { workspace = true }
tracing = { workspace = true }
tracing-subscriber = { workspace = true }

View file

@ -42,12 +42,21 @@ grcov-coverage:
publish version:
#!/usr/bin/bash -e
[[ -z $(git status --short) ]] || echo "Worktree is Dirty - aborting" ; exit
echo "Clean"
echo "Publishing git-next v{{version}} to crates.io..."
if [ -z $(git status --short) ]; then
echo "Worktree is clean - proceeding"
else
echo "Worktree is Dirty - aborting" ; exit
fi
git co v{{version}}
ORDER=$(cargo publish-workspace --target-version {{version}} --crate-prefix git-next --show-order 2>/dev/null | cut -d\ -f2-)
echo "Publishing crates in order: ${ORDER}"
# INFO: Why not use publish-workspace to publish? It doesn't support when crates-io registry is replaced
for P in ${ORDER}
do
echo "Publishing ${P}..."
cargo publish --registry crates-io -p $P
echo "Done: ${P}"
echo "======================================"
done
echo "All crates published"