From 5e2418ff560640a7e4e9bdaa2cd10b27f2b835ec Mon Sep 17 00:00:00 2001 From: Ankan Saha Date: Sun, 1 Feb 2026 23:56:45 +0530 Subject: [PATCH] feat: Bump version to 6.16.41-stable and display the installation method in the application banner. --- INSTALLATION.md | 4 ++-- README.md | 3 ++- Scripts/installer.sh | 2 +- VERSION | 2 +- src/Core/main.go | 2 +- src/base/Banner.go | 26 +++++++++++++++++++++++++- 6 files changed, 32 insertions(+), 7 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index b3b4017..9fef519 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -19,10 +19,10 @@ This is the simplest method for Debian-based systems like Ubuntu, Debian, Linux ```bash # Download the latest .deb release -wget https://github.com/nexoral/ContainDB/releases/download/v5.14.39-stable/containDB_5.14.39-stable_amd64.deb +wget https://github.com/nexoral/ContainDB/releases/download/v6.16.41-stable/containDB_6.16.41-stable_amd64.deb # Install the package -sudo dpkg -i containDB_5.14.39-stable_amd64.deb +sudo dpkg -i containDB_6.16.41-stable_amd64.deb # If you see dependency errors, run: sudo apt-get install -f diff --git a/README.md b/README.md index ccafcb5..9502461 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,8 @@ ![License](https://img.shields.io/badge/license-MIT-green) ![Go Version](https://img.shields.io/badge/go-%3E%3D1.18-blue) - ![Platform](https://img.shields.io/badge/platform-linux-lightgrey) + ![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey) + ![npm](https://img.shields.io/badge/available%20via-npm-red) ## The Problem ContainDB Solves diff --git a/Scripts/installer.sh b/Scripts/installer.sh index 2a55867..937668f 100755 --- a/Scripts/installer.sh +++ b/Scripts/installer.sh @@ -7,7 +7,7 @@ ARCH=$(dpkg --print-architecture) echo "Detected architecture: $ARCH" -VERSION="5.14.39-stable" +VERSION="6.16.41-stable" if [[ "$ARCH" == "amd64" ]]; then PKG="containdb_${VERSION}_amd64.deb" diff --git a/VERSION b/VERSION index a31a3aa..5130aaa 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -5.14.39-stable +6.16.41-stable diff --git a/src/Core/main.go b/src/Core/main.go index 549b5a0..095d95d 100644 --- a/src/Core/main.go +++ b/src/Core/main.go @@ -12,7 +12,7 @@ import ( ) func main() { - VERSION := "5.14.39-stable" + VERSION := "6.16.41-stable" // handle version flag without requiring sudo if len(os.Args) > 1 && os.Args[1] == "--version" { diff --git a/src/base/Banner.go b/src/base/Banner.go index 091d572..ff22de7 100644 --- a/src/base/Banner.go +++ b/src/base/Banner.go @@ -2,12 +2,32 @@ package base import ( "fmt" + "os/exec" "strings" "github.com/fatih/color" ) -const Version = "5.14.39-stable" +const Version = "6.16.41-stable" + +// GetInstallationMethod detects how ContainDB was installed +func GetInstallationMethod() string { + // Check if installed via dpkg (Debian package) + cmd := exec.Command("dpkg", "-s", "containdb") + if err := cmd.Run(); err == nil { + return "Debian Package (.deb)" + } + + // Check if installed via npm + cmd = exec.Command("npm", "list", "-g", "containdb") + output, err := cmd.CombinedOutput() + if err == nil && strings.Contains(string(output), "containdb") { + return "NPM Package" + } + + // Default to manual installation + return "Manual Installation" +} func ShowBanner() { // Define styles @@ -44,8 +64,12 @@ func ShowBanner() { fmt.Printf("%s\n", boldWhite("🛠️ Welcome to ")+boldGreen("ContainDB")+boldWhite(" - Containerized Database Manager CLI")) fmt.Println(border) + // Get installation method + installMethod := GetInstallationMethod() + // Info Block fmt.Printf("%s %s\n", boldCyan("📦 Version:"), white(Version)) + fmt.Printf("%s %s\n", boldCyan("📥 Installed via:"), white(installMethod)) fmt.Printf("%s %s\n", boldCyan("👨‍💻 Author:"), white("Ankan Saha")) fmt.Printf("%s %s\n", boldCyan("🔗 GitHub:"), cyan("https://github.com/nexoral/ContainDB")) fmt.Printf("%s %s\n", boldCyan("💖 Sponsor:"), cyan("https://github.com/sponsors/AnkanSaha"))