#!/bin/bash

# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color

echo -e "${BLUE}📋 Current debian/changelog status:${NC}"
echo ""

# Show the first entry (current version)
echo -e "${GREEN}📦 Current version entry:${NC}"
head -15 debian/changelog
echo ""

# Show version comparison
echo -e "${YELLOW}🔍 Version comparison:${NC}"
NPM_VERSION=$(node -p "require('./package.json').version")
DEB_VERSION=$(head -1 debian/changelog | sed 's/.*(\([^)]*\)).*/\1/')

echo "npm version: ${NPM_VERSION}"
echo "debian version: ${DEB_VERSION}"

if [ "$NPM_VERSION" = "${DEB_VERSION%-*}" ]; then
    echo -e "${GREEN}✅ Versions are synchronized!${NC}"
else
    echo -e "${YELLOW}⚠️ Versions are not synchronized${NC}"
fi 