A command-line tool for automating software version monitoring for DevOps engineers and system administrators.
- Automated Version Scanning: Monitors multiple repositories for new versions
- Multiple Version Schemes: Supports SemVer, CalVer, and string-based versioning
- CI/CD Integration: Standardized exit codes for pipeline automation
- Authentication Support: Handles private repositories with token and SSH authentication
- Flexible Output: Human-readable and JSON output formats
- Configurable: JSON-based configuration with extensive customization options
go install github.com/wellcom-rocks/updates-sucks@latest
go build -o updates-sucks
# Scan all repositories
./updates-sucks scan
# Scan specific repository
./updates-sucks scan "Kubernetes"
# Use custom configuration file
./updates-sucks scan --file /path/to/config.json
# JSON output for automation
./updates-sucks scan --format json
# Verbose output for debugging
./updates-sucks scan --verbose
# Quiet output for CI/CD
./updates-sucks scan --quiet
Create a repos.json
file in your project directory:
{
"repositories": [
{
"name": "Kubernetes",
"type": "git",
"url": "https://github.com/kubernetes/kubernetes.git",
"currentVersion": "v1.28.0",
"versioning": {
"scheme": "semver",
"ignorePrefix": "v"
}
},
{
"name": "Private Repository",
"type": "git",
"url": "git@github.com:company/private-repo.git",
"currentVersion": "1.5.0",
"auth": {
"type": "token",
"envVariable": "GITHUB_TOKEN"
}
}
]
}
name
: Human-readable name for the repositorytype
: Repository type (currently only"git"
is supported)url
: Repository URL (HTTPS or SSH)currentVersion
: Current version in useversioning
(optional):scheme
: Version scheme ("semver"
,"calver"
,"string"
)ignorePrefix
: Prefix to ignore when comparing versions (e.g.,"v"
)
auth
(optional):type
: Authentication type ("token"
or"ssh"
)envVariable
: Environment variable containing the token/key path
0
: Success, no updates available1
: Success, updates found2
: Configuration error3
: Scan error (network, authentication, etc.)
# Check for updates
./updates-sucks scan
# Output:
# Scanning 3 repositories...
#
# - Kubernetes: UP-TO-DATE (Current: v1.28.0)
# - Docker: NEW VERSION FOUND! (Current: v24.0.0 -> Latest: v24.0.5)
# - Prometheus: UP-TO-DATE (Current: v2.45.0)
#
# Scan finished. Updates available for 1 repository(ies).
./updates-sucks scan --format json
{
"summary": {
"total": 3,
"upToDate": 2,
"updatesAvailable": 1,
"errors": 0
},
"repositories": [
{
"name": "Kubernetes",
"status": "UP_TO_DATE",
"currentVersion": "v1.28.0",
"latestVersion": "v1.28.0"
},
{
"name": "Docker",
"status": "UPDATE_AVAILABLE",
"currentVersion": "v24.0.0",
"latestVersion": "v24.0.5"
}
]
}
#!/bin/bash
./updates-sucks scan --quiet --format json
case $? in
0)
echo "All repositories are up to date"
;;
1)
echo "Updates are available!"
# Trigger notification or further processing
;;
2)
echo "Configuration error"
exit 1
;;
3)
echo "Scan failed"
exit 1
;;
esac
export GITHUB_TOKEN="your-token-here"
./updates-sucks scan
export SSH_KEY_PATH="/path/to/your/ssh/key"
./updates-sucks scan
- Format:
MAJOR.MINOR.PATCH
(e.g.,1.2.3
,v2.0.0
) - Supports pre-release and build metadata
- Default scheme if not specified
- Format:
YYYY.MM.MICRO
(e.g.,2024.05.1
) - Useful for date-based releases
- Lexicographic comparison
- Fallback for non-standard versioning schemes
- Uses
git ls-remote
for efficient tag fetching without cloning - Lightweight and fast for CI/CD pipeline integration
- Minimal memory footprint
This project follows the specification detailed in spec.md
. Please refer to the specification for architectural decisions and implementation details.
This project is licensed under the MIT License.