Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

## [Unreleased]

## [0.4.0](https://github.com/syncable-dev/syncable-cli/compare/v0.3.0...v0.4.0) - 2025-06-06

### Other

- Feature/condense overview with new representation ([#29](https://github.com/syncable-dev/syncable-cli/pull/29))

## [0.3.0](https://github.com/syncable-dev/syncable-cli/compare/v0.2.1...v0.3.0) - 2025-06-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "syncable-cli"
version = "0.3.0"
version = "0.4.0"
edition = "2024"
authors = ["Syncable Team"]
description = "A Rust-based CLI that analyzes code repositories and generates Infrastructure as Code configurations"
Expand Down
16 changes: 6 additions & 10 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ use clap::Parser;
use syncable_cli::{
analyzer::{
self, vulnerability_checker::VulnerabilitySeverity, DetectedTechnology, TechnologyCategory, LibraryType,
analyze_monorepo, analyze_monorepo_with_config, MonorepoAnalysis, ProjectCategory, ArchitecturePattern,
DockerAnalysis, DockerfileInfo, ComposeFileInfo, DockerService, OrchestrationPattern,
NetworkingConfig, DockerEnvironment,
SecurityAnalyzer, SecurityAnalysisConfig, SecuritySeverity,
DependencyAnalysis, VulnerabilitySeverity as VulnSeverity,
vulnerability_checker::VulnerabilityChecker
analyze_monorepo, ProjectCategory,
},
cli::{Cli, Commands, ToolsCommand, OutputFormat, SeverityThreshold, DisplayFormat},
config,
Expand Down Expand Up @@ -127,23 +122,24 @@ fn check_for_update() {
}
}

// Query crates.io with proper User-Agent header
// Query GitHub releases API instead of crates.io
let client = reqwest::blocking::Client::builder()
.user_agent(format!("syncable-cli/{} ({})", env!("CARGO_PKG_VERSION"), env!("CARGO_PKG_REPOSITORY")))
.build();

if let Ok(client) = client {
let resp = client
.get("https://crates.io/api/v1/crates/syncable-cli")
.get("https://api.github.com/repos/syncable-dev/syncable-cli/releases/latest")
.send()
.and_then(|r| r.json::<serde_json::Value>());

if let Ok(json) = resp {
let latest = json["crate"]["max_version"].as_str().unwrap_or("");
let latest = json["tag_name"].as_str().unwrap_or("")
.trim_start_matches('v'); // Remove 'v' prefix if present
let current = env!("CARGO_PKG_VERSION");
if latest != "" && latest != current {
println!(
"\x1b[33m🔔 A new version of sync-ctl is available: {latest} (current: {current})\nRun `cargo install syncable-cli --force` to update.\x1b[0m"
"\x1b[33m🔔 A new version of sync-ctl is available: {latest} (current: {current})\nRun `cargo install --git https://github.com/syncable-dev/syncable-cli --tag v{latest}` to update.\x1b[0m"
);
}
}
Expand Down