Compare commits
7
Commits
v1.0.1-preview
...
v1.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a18eb13cbf
|
||
|
|
dd7c2d2390
|
||
|
|
107b18b461
|
||
|
|
506bf90cce
|
||
|
|
6d784b074b
|
||
|
|
8e1401439a
|
||
|
|
e9b47d7eb0
|
@@ -58,12 +58,13 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
REPO: ${{ gitea.repository || github.repository }}
|
||||
REPO_NAME: ${{ gitea.repository_name || github.event.repository.name }}
|
||||
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||
run: |
|
||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||
TAG_NAME="v${VERSION}"
|
||||
RELEASE_TITLE="Release ${TAG_NAME}"
|
||||
RELEASE_NOTES="Automatisches Release für config Crate ${VERSION}."
|
||||
RELEASE_NOTES="Automatisches Release für ${REPO_NAME} Crate ${VERSION}."
|
||||
|
||||
echo "Erstelle oder hole Release für Tag ${TAG_NAME} in ${REPO}..."
|
||||
|
||||
|
||||
@@ -35,12 +35,13 @@ jobs:
|
||||
env:
|
||||
GITEA_URL: ${{ gitea.server_url || github.server_url }}
|
||||
REPO: ${{ gitea.repository || github.repository }}
|
||||
REPO_NAME: ${{ gitea.repository_name || github.event.repository.name }}
|
||||
TOKEN: ${{ secrets.PACKAGE_TOKEN || secrets.RELEASE_TOKEN || secrets.PUBLISH_TOKEN || secrets.API_TOKEN || secrets.PAT_TOKEN || secrets.CUSTOM_TOKEN || secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN || github.token }}
|
||||
run: |
|
||||
VERSION="$(sed -n 's/^version = "\(.*\)"/\1/p' Cargo.toml | head -n1)"
|
||||
TAG_NAME="v${VERSION}-preview"
|
||||
RELEASE_TITLE="Preview Release ${TAG_NAME}"
|
||||
RELEASE_NOTES="Automatisches Preview-Release für config Crate ${VERSION} (Branch: Testing)."
|
||||
RELEASE_NOTES="Automatisches Preview-Release für ${REPO_NAME} Crate ${VERSION} (Branch: Testing)."
|
||||
|
||||
echo "Erstelle oder hole Preview-Release für Tag ${TAG_NAME} in ${REPO}..."
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
# AGENTS.md — Entwickler- und Agenten-Dokumentation für Config
|
||||
# AGENTS.md — Entwickler- und Agenten-Dokumentation für Config (config-ctdra)
|
||||
|
||||
Diese Datei dient als Leitfaden und Kontextdokumentation für autonome Agenten und Entwickler, die an der Codebasis der Crate `config` arbeiten.
|
||||
Diese Datei dient als Leitfaden und Kontextdokumentation für autonome Agenten und Entwickler, die an der Codebasis der Crate `config-ctdra` arbeiten.
|
||||
|
||||
---
|
||||
|
||||
## 1. Projektübersicht
|
||||
|
||||
`config` ist eine leichtgewichtige, threadsichere Rust-Crate (Edition 2024) zur Konfigurationsverwaltung. Sie ermöglicht das Speichern, Laden und Modifizieren beliebiger Konfigurationsstrukturen mit automatischer Pfadermittlung für Root- und regulären Benutzermodus.
|
||||
`config-ctdra` ist eine leichtgewichtige, threadsichere Rust-Crate (Edition 2024) zur Konfigurationsverwaltung. Sie ermöglicht das Speichern, Laden und Modifizieren beliebiger Konfigurationsstrukturen mit automatischer Pfadermittlung für Root- und regulären Benutzermodus.
|
||||
|
||||
### Wichtige Rahmenbedingungen & Prinzipien
|
||||
|
||||
|
||||
Generated
+2
-2
@@ -9,8 +9,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
||||
|
||||
[[package]]
|
||||
name = "config"
|
||||
version = "1.0.1"
|
||||
name = "config-ctdra"
|
||||
version = "1.0.2"
|
||||
dependencies = [
|
||||
"confy",
|
||||
"libc",
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "config"
|
||||
version = "1.0.1"
|
||||
name = "config-ctdra"
|
||||
version = "1.0.2"
|
||||
edition = "2024"
|
||||
authors = ['DragonSlayer_14']
|
||||
readme = "README.md"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Config (`config`)
|
||||
# Config (`config-ctdra`)
|
||||
|
||||
`config` ist eine leichtgewichtige, threadsichere Konfigurationsverwaltungs-Crate für Rust mit automatischer Pfadermittlung für Root- und regulären Benutzermodus sowie Unterstützung für beliebige benutzerdefinierte Datenstrukturen.
|
||||
`config-ctdra` ist eine leichtgewichtige, threadsichere Konfigurationsverwaltungs-Crate für Rust mit automatischer Pfadermittlung für Root- und regulären Benutzermodus sowie Unterstützung für beliebige benutzerdefinierte Datenstrukturen.
|
||||
|
||||
## Merkmale
|
||||
|
||||
@@ -29,16 +29,16 @@ Füge anschließend die Abhängigkeit in deiner `Cargo.toml` ein:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
config = { version = "1.0.0", registry = "gitea" }
|
||||
config-ctdra = { version = "1.0.1", registry = "gitea" }
|
||||
```
|
||||
|
||||
Alternativ als Git- oder Pfad-Abhängigkeit:
|
||||
|
||||
```toml
|
||||
[dependencies]
|
||||
config = { git = "https://gitea.creative-dragonslayer.de/Rust-Crates/config.git", branch = "main" }
|
||||
config-ctdra = { git = "https://gitea.creative-dragonslayer.de/Rust-Crates/config.git", branch = "main" }
|
||||
# oder lokal:
|
||||
# config = { path = "../Config" }
|
||||
# config-ctdra = { path = "../Config" }
|
||||
```
|
||||
|
||||
---
|
||||
@@ -97,7 +97,7 @@ impl Default for Database {
|
||||
### 2. Globales Caching mit `get_config`
|
||||
|
||||
```rust
|
||||
use config::{get_config, set_program_name};
|
||||
use config_ctdra::{get_config, set_program_name};
|
||||
|
||||
fn main() {
|
||||
set_program_name("my-service");
|
||||
@@ -111,7 +111,7 @@ fn main() {
|
||||
### 3. Konfiguration modifizieren
|
||||
|
||||
```rust
|
||||
use config::modify_config;
|
||||
use config_ctdra::modify_config;
|
||||
|
||||
fn update_settings() {
|
||||
modify_config::<AppConfig, _>(|cfg| {
|
||||
@@ -123,9 +123,9 @@ fn update_settings() {
|
||||
### 4. Manuelles Laden und Speichern
|
||||
|
||||
```rust
|
||||
use config::{load, store};
|
||||
use config_ctdra::{load, store};
|
||||
|
||||
fn custom_workflow() -> Result<(), config::ConfyError> {
|
||||
fn custom_workflow() -> Result<(), config_ctdra::ConfyError> {
|
||||
let mut cfg: AppConfig = load()?;
|
||||
cfg.general.log_level = "debug".to_string();
|
||||
store(&cfg)?;
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
//!
|
||||
//! # Beispiel
|
||||
//! ```rust
|
||||
//! use config::{get_config, modify_config, set_program_name};
|
||||
//! use config_ctdra::{get_config, modify_config, set_program_name};
|
||||
//! use serde::{Deserialize, Serialize};
|
||||
//!
|
||||
//! #[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
|
||||
|
||||
Reference in New Issue
Block a user