feature/sdk-npm
claude/smbcloud-github-app-k9641p
development
feature/apps
feature/build-release
feature/ci-docs
feature/ci-ruby-gems
feature/cicd
feature/completion
feature/dist-nuget
feature/fix-ci-sdk-pypi-rubygem
feature/fix-clippy-on-stable-channel
feature/fix-deployment-script
feature/github-email
feature/gresiq-v1
feature/project-new-structure
feature/rsync-deploy
feature/ruby-runner
feature/sdk-npm
feature/sdk-workflows
feature/smbcloud-cli-release-npm
feature/smbcloud-deploy
feature/wasm
main
release/v0.7.4
| 1 | use { |
| 2 | serde::{Deserialize, Serialize}, |
| 3 | smbcloud_model::project::Project, |
| 4 | }; |
| 5 | |
| 6 | /// smbCloud config from the .smb/config.toml file. |
| 7 | #[derive(Deserialize, Serialize)] |
| 8 | pub struct Config { |
| 9 | pub name: String, |
| 10 | pub description: Option<String>, |
| 11 | pub project: Project, |
| 12 | pub projects: Option<Vec<Project>>, |
| 13 | } |
| 14 | |
| 15 | impl Config { |
| 16 | pub fn ssh_key_path(&self, user_id: i32) -> String { |
| 17 | // Use the dirs crate to get the home directory |
| 18 | let home = dirs::home_dir().expect("Could not determine home directory"); |
| 19 | let key_path = home.join(".ssh").join(format!("id_{}@smbcloud", user_id)); |
| 20 | let key_path_str = key_path.to_string_lossy().to_string(); |
| 21 | println!("Use key path: {}", key_path_str); |
| 22 | key_path_str |
| 23 | } |
| 24 | } |