Update version to 0.1.3 and simplify version output

- Update Cargo.toml version to 0.1.3
- Custom version flag implementation to output version only
- Update GitHub Actions to handle simplified version output
- Update Gitea Actions (action.yml) for version handling
- Now `ailog -V` or `ailog --version` outputs just "0.1.3"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-06-14 17:12:04 +09:00
parent 5838adf5a6
commit 2838e494d6
4 changed files with 24 additions and 9 deletions

View File

@ -69,7 +69,7 @@ runs:
# Check current binary version if exists
mkdir -p ./bin
if [ -f "./bin/ailog" ]; then
CURRENT_VERSION=$(./bin/ailog --version | awk '{print $2}' 2>/dev/null || echo "unknown")
CURRENT_VERSION=$(./bin/ailog --version 2>/dev/null || echo "unknown")
echo "Current version: $CURRENT_VERSION"
else
CURRENT_VERSION="none"
@ -83,13 +83,13 @@ runs:
if curl -sL https://github.com/syui/ailog/releases/download/$LATEST_VERSION/ailog-linux-x86_64.tar.gz | tar -xzf - 2>/dev/null; then
mv ailog ./bin/ailog
chmod +x ./bin/ailog
echo "Downloaded binary: $(./bin/ailog --version)"
echo "Downloaded binary: $(./bin/ailog --version 2>/dev/null)"
else
echo "Download failed, building from source..."
if command -v cargo >/dev/null 2>&1; then
cargo build --release
cp ./target/release/ailog ./bin/ailog
echo "Built from source: $(./bin/ailog --version)"
echo "Built from source: $(./bin/ailog --version 2>/dev/null)"
else
echo "Error: Neither download nor cargo build available"
exit 1