bump version to 1.1.0, centralize VERSION constant

This commit is contained in:
Username
2025-12-20 04:21:06 +01:00
parent ccfd8509cc
commit c76a158c18
5 changed files with 11 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ import uuid
from flask import Flask, Response, g, request
from app.config import config
from app.config import VERSION, config
def setup_logging(app: Flask) -> None:
@@ -176,7 +176,7 @@ def setup_metrics(app: Flask) -> None:
metrics = PrometheusMetrics(app)
# Add app info
metrics.info("flaskpaste_info", "FlaskPaste application info", version="1.0.0")
metrics.info("flaskpaste_info", "FlaskPaste application info", version=VERSION)
app.extensions["metrics"] = metrics
except ImportError:

View File

@@ -11,6 +11,7 @@ import time
from flask import Response, current_app, request
from app.api import bp
from app.config import VERSION
from app.database import check_content_hash, get_db
# Valid paste ID pattern (hexadecimal only)
@@ -275,7 +276,7 @@ def index():
return _json_response(
{
"name": "FlaskPaste",
"version": "1.0.0",
"version": VERSION,
"endpoints": {
"GET /": "API information",
"GET /health": "Health check",

View File

@@ -3,6 +3,9 @@
import os
from pathlib import Path
# Application version
VERSION = "1.1.0"
class Config:
"""Base configuration."""

View File

@@ -103,7 +103,7 @@ Host: localhost:5000
```json
{
"name": "FlaskPaste",
"version": "1.0.0",
"version": "1.1.0",
"endpoints": {
"GET /": "API information",
"GET /health": "Health check",

View File

@@ -2,6 +2,8 @@
import json
from app.config import VERSION
class TestIndex:
"""Tests for GET / endpoint."""
@@ -12,7 +14,7 @@ class TestIndex:
assert response.status_code == 200
data = json.loads(response.data)
assert data["name"] == "FlaskPaste"
assert data["version"] == "1.0.0"
assert data["version"] == VERSION
assert "endpoints" in data
assert "usage" in data