Compare commits
6 commits
b89431b779
...
0656784d41
Author | SHA1 | Date | |
---|---|---|---|
0656784d41 | |||
5dc0de8a05 | |||
bf12712bca | |||
b7abe949e2 | |||
e56d6a3ebb | |||
691a733fc3 |
9 changed files with 58 additions and 48 deletions
|
@ -4,8 +4,6 @@ linker = "/usr/bin/clang-16"
|
||||||
rustflags = [
|
rustflags = [
|
||||||
"-C",
|
"-C",
|
||||||
"link-arg=--ld-path=/usr/bin/mold",
|
"link-arg=--ld-path=/usr/bin/mold",
|
||||||
"--cfg",
|
|
||||||
"tokio_unstable",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.dev]
|
[profile.dev]
|
||||||
|
@ -14,4 +12,3 @@ strip = "debuginfo"
|
||||||
|
|
||||||
[env]
|
[env]
|
||||||
RUST_LOG = "hyper=warn,git_url_parse=warn,debug"
|
RUST_LOG = "hyper=warn,git_url_parse=warn,debug"
|
||||||
RUSTFLAGS = "--cfg tokio_unstable"
|
|
||||||
|
|
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -2,8 +2,23 @@
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
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
|
## [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
|
### Bug Fixes
|
||||||
|
|
||||||
- Don't log content of internal messages ([3ae1132](https://git.kemitix.net/kemitix/git-next/commit/3ae113212af3ee43f36383a22984e03e3f44f3f2))
|
- 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))
|
- 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 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))
|
- 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
|
### Refactor
|
||||||
|
|
||||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -3,7 +3,7 @@ resolver = "2"
|
||||||
members = ["crates/*"]
|
members = ["crates/*"]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.12.0" # Update git-next-* under workspace.dependencies
|
version = "0.12.1" # Update git-next-* under workspace.dependencies
|
||||||
|
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
license = "MIT"
|
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-forgejo = { path = "crates/forge-forgejo", version = "0.12" }
|
||||||
git-next-forge-github = { path = "crates/forge-github", 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
|
# CLI parsing
|
||||||
clap = { version = "4.5", features = ["cargo", "derive"] }
|
clap = { version = "4.5", features = ["cargo", "derive"] }
|
||||||
|
|
||||||
# logging
|
# logging
|
||||||
console-subscriber = "0.3"
|
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
tracing-subscriber = "0.3"
|
tracing-subscriber = "0.3"
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ clap = { workspace = true }
|
||||||
kxio = { workspace = true }
|
kxio = { workspace = true }
|
||||||
|
|
||||||
# logging
|
# logging
|
||||||
console-subscriber = { workspace = true }
|
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tracing-subscriber = { workspace = true }
|
tracing-subscriber = { workspace = true }
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,9 @@ async fn send_webhook(
|
||||||
tracing::warn!("Invalid notification configuration (config) - can't sent notification");
|
tracing::warn!("Invalid notification configuration (config) - can't sent notification");
|
||||||
return;
|
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");
|
tracing::warn!("Invalid notification configuration (signer) - can't sent notification");
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,7 +11,7 @@ use actor::ServerActor;
|
||||||
use git_next_core::git::RepositoryFactory;
|
use git_next_core::git::RepositoryFactory;
|
||||||
|
|
||||||
use kxio::{fs::FileSystem, network::Network};
|
use kxio::{fs::FileSystem, network::Network};
|
||||||
use tracing::{info, level_filters::LevelFilter};
|
use tracing::info;
|
||||||
|
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
|
@ -68,20 +68,16 @@ pub fn start(
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn init_logging() {
|
pub fn init_logging() {
|
||||||
use tracing_subscriber::prelude::*;
|
use tracing::Level;
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::FmtSubscriber;
|
||||||
|
|
||||||
let subscriber = tracing_subscriber::fmt::layer()
|
let subscriber = FmtSubscriber::builder()
|
||||||
.with_target(false)
|
.with_target(false)
|
||||||
.with_file(true)
|
.with_file(true)
|
||||||
.with_line_number(true)
|
.with_line_number(true)
|
||||||
.with_filter(
|
.with_max_level(Level::INFO)
|
||||||
EnvFilter::builder()
|
.finish();
|
||||||
.with_default_directive(LevelFilter::INFO.into())
|
|
||||||
.from_env_lossy(),
|
#[allow(clippy::expect_used)]
|
||||||
);
|
tracing::subscriber::set_global_default(subscriber).expect("setting default subscriber failed");
|
||||||
tracing_subscriber::registry()
|
|
||||||
.with(console_subscriber::ConsoleLayer::builder().spawn())
|
|
||||||
.with(subscriber)
|
|
||||||
.init();
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,26 @@
|
||||||
[http]
|
[http] # where to listen for incoming updates from forges
|
||||||
addr = "0.0.0.0"
|
addr = "0.0.0.0"
|
||||||
port = 8080
|
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
|
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"
|
path = "./data"
|
||||||
|
|
||||||
[notifications]
|
[forge] # the forges to connect to
|
||||||
type = "WebHook"
|
|
||||||
webhook = { url = "https://localhost:9090" }
|
|
||||||
|
|
||||||
[forge]
|
# [forge.default]
|
||||||
|
# forge_type = "ForgeJo"
|
||||||
[forge.default]
|
# hostname = "git.example.net"
|
||||||
forge_type = "ForgeJo"
|
# user = "bob" # the user to perform actions as
|
||||||
hostname = "git.example.net"
|
# token = "API-Token"
|
||||||
user = "git-next" # 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" }
|
||||||
[forge.default.repos]
|
# world = { repo = "bob/world", branch = "master", main = "master", next = "upcoming", "dev" = "develop" }
|
||||||
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
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ github = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
# logging
|
# logging
|
||||||
console-subscriber = { workspace = true }
|
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
tracing-subscriber = { workspace = true }
|
tracing-subscriber = { workspace = true }
|
||||||
|
|
||||||
|
|
13
justfile
13
justfile
|
@ -42,12 +42,21 @@ grcov-coverage:
|
||||||
|
|
||||||
publish version:
|
publish version:
|
||||||
#!/usr/bin/bash -e
|
#!/usr/bin/bash -e
|
||||||
[[ -z $(git status --short) ]] || echo "Worktree is Dirty - aborting" ; exit
|
echo "Publishing git-next v{{version}} to crates.io..."
|
||||||
echo "Clean"
|
if [ -z $(git status --short) ]; then
|
||||||
|
echo "Worktree is clean - proceeding"
|
||||||
|
else
|
||||||
|
echo "Worktree is Dirty - aborting" ; exit
|
||||||
|
fi
|
||||||
git co v{{version}}
|
git co v{{version}}
|
||||||
ORDER=$(cargo publish-workspace --target-version {{version}} --crate-prefix git-next --show-order 2>/dev/null | cut -d\ -f2-)
|
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
|
# INFO: Why not use publish-workspace to publish? It doesn't support when crates-io registry is replaced
|
||||||
for P in ${ORDER}
|
for P in ${ORDER}
|
||||||
do
|
do
|
||||||
|
echo "Publishing ${P}..."
|
||||||
cargo publish --registry crates-io -p $P
|
cargo publish --registry crates-io -p $P
|
||||||
|
echo "Done: ${P}"
|
||||||
|
echo "======================================"
|
||||||
done
|
done
|
||||||
|
echo "All crates published"
|
||||||
|
|
Loading…
Reference in a new issue