Compare commits
6 Commits
9e11648a7c
...
v0.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e37b80a262 | ||
| 3ce62c272e | |||
| 21b771507c | |||
| 508c8b7feb | |||
|
|
33a889fa67 | ||
|
|
7ddb7812fc |
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## v0.2.2 (2025-09-30)
|
||||
|
||||
### Refactor
|
||||
|
||||
- Environment variable interpolation in config file works globally, not based on type
|
||||
|
||||
## v0.2.1 (2025-09-30)
|
||||
|
||||
### Feat
|
||||
|
||||
Generated
+4
-4
@@ -230,7 +230,7 @@ version = "1.14.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "879b6c89592deb404ba4dc0ae6b58ffd1795c78991cbb5b8bc441c48a070440d"
|
||||
dependencies = [
|
||||
"aws-lc-sys 0.32.1",
|
||||
"aws-lc-sys 0.32.2",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
@@ -249,9 +249,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "aws-lc-sys"
|
||||
version = "0.32.1"
|
||||
version = "0.32.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ba2e2516bdf37af57fc6ff047855f54abad0066e5c4fdaaeb76dabb2e05bcf5"
|
||||
checksum = "a2b715a6010afb9e457ca2b7c9d2b9c344baa8baed7b38dc476034c171b32575"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
@@ -1632,7 +1632,7 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
||||
|
||||
[[package]]
|
||||
name = "gman"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "gman"
|
||||
version = "0.2.1"
|
||||
version = "0.2.2"
|
||||
edition = "2024"
|
||||
authors = ["Alex Clarke <alex.j.tusa@gmail.com>"]
|
||||
description = "Universal command line secret management and injection tool"
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
use crate::command::preview_command;
|
||||
use anyhow::{anyhow, Context, Result};
|
||||
use anyhow::{Context, Result, anyhow};
|
||||
use clap_complete::CompletionCandidate;
|
||||
use futures::future::join_all;
|
||||
use gman::config::{load_config, Config, RunConfig};
|
||||
use gman::config::{Config, RunConfig, load_config};
|
||||
use log::{debug, error};
|
||||
use regex::Regex;
|
||||
use std::collections::HashMap;
|
||||
|
||||
@@ -4,12 +4,12 @@ use crate::cli::secrets_completer;
|
||||
use anyhow::{Context, Result};
|
||||
use clap::Subcommand;
|
||||
use clap::{
|
||||
crate_authors, crate_description, crate_name, crate_version, CommandFactory, Parser, ValueEnum,
|
||||
CommandFactory, Parser, ValueEnum, crate_authors, crate_description, crate_name, crate_version,
|
||||
};
|
||||
use clap_complete::{ArgValueCompleter, CompleteEnv};
|
||||
use crossterm::execute;
|
||||
use crossterm::terminal::{disable_raw_mode, LeaveAlternateScreen};
|
||||
use gman::config::{get_config_file_path, load_config, Config};
|
||||
use crossterm::terminal::{LeaveAlternateScreen, disable_raw_mode};
|
||||
use gman::config::{Config, get_config_file_path, load_config};
|
||||
use std::ffi::OsString;
|
||||
use std::io::{self, IsTerminal, Read, Write};
|
||||
use std::panic::PanicHookInfo;
|
||||
|
||||
+3
-6
@@ -300,10 +300,8 @@ pub fn load_config(interpolate: bool) -> Result<Config> {
|
||||
let yaml = app_dir.join("config.yaml");
|
||||
if yml.exists() || yaml.exists() {
|
||||
let load_path = if yml.exists() { &yml } else { &yaml };
|
||||
let mut content =
|
||||
fs::read_to_string(load_path).with_context(|| {
|
||||
format!("failed to read config file '{}'", load_path.display())
|
||||
})?;
|
||||
let mut content = fs::read_to_string(load_path)
|
||||
.with_context(|| format!("failed to read config file '{}'", load_path.display()))?;
|
||||
if interpolate {
|
||||
content = interpolate_env_vars(&content);
|
||||
}
|
||||
@@ -340,8 +338,7 @@ pub fn load_config(interpolate: bool) -> Result<Config> {
|
||||
|
||||
fn load_confy_config(interpolate: bool) -> Result<Config> {
|
||||
let load_path = confy::get_configuration_file_path("gman", "config")?;
|
||||
let mut content =
|
||||
fs::read_to_string(&load_path)
|
||||
let mut content = fs::read_to_string(&load_path)
|
||||
.with_context(|| format!("failed to read config file '{}'", load_path.display()))?;
|
||||
if interpolate {
|
||||
content = interpolate_env_vars(&content);
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use anyhow::{anyhow, bail, Context};
|
||||
use anyhow::{Context, anyhow, bail};
|
||||
use secrecy::{ExposeSecret, SecretString};
|
||||
use std::collections::HashMap;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::{env, fs};
|
||||
use zeroize::Zeroize;
|
||||
|
||||
use crate::config::{get_config_file_path, load_config, Config};
|
||||
use crate::config::{Config, get_config_file_path, load_config};
|
||||
use crate::providers::git_sync::{
|
||||
default_git_email, default_git_username, ensure_git_available, repo_name_from_url, resolve_git,
|
||||
sync_and_push, SyncOpts,
|
||||
SyncOpts, default_git_email, default_git_username, ensure_git_available, repo_name_from_url,
|
||||
resolve_git, sync_and_push,
|
||||
};
|
||||
use crate::providers::{SecretProvider, SupportedProvider};
|
||||
use crate::{
|
||||
@@ -16,13 +16,13 @@ use crate::{
|
||||
};
|
||||
use anyhow::Result;
|
||||
use argon2::{Algorithm, Argon2, Params, Version};
|
||||
use base64::{engine::general_purpose::STANDARD as B64, Engine as _};
|
||||
use base64::{Engine as _, engine::general_purpose::STANDARD as B64};
|
||||
use chacha20poly1305::aead::rand_core::RngCore;
|
||||
use chacha20poly1305::{
|
||||
aead::{Aead, KeyInit, OsRng},
|
||||
Key, XChaCha20Poly1305, XNonce,
|
||||
aead::{Aead, KeyInit, OsRng},
|
||||
};
|
||||
use dialoguer::{theme, Input};
|
||||
use dialoguer::{Input, theme};
|
||||
use log::{debug, error};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_with::skip_serializing_none;
|
||||
|
||||
Reference in New Issue
Block a user