Browse Source

Fix VERSION

pull/1/head
Dashie der otter 1 year ago
parent
commit
1ca9417bb1
3 changed files with 8 additions and 5 deletions
  1. 2
    2
      activitypub/backend.py
  2. 5
    3
      app.py
  3. 1
    0
      version.py

+ 2
- 2
activitypub/backend.py View File

@@ -4,7 +4,7 @@ import requests
from models import db, Activity, create_remote_actor, Actor
from urllib.parse import urlparse
from .vars import Box
from app import __VERSION__
from version import VERSION


class Reel2BitsBackend(ap.Backend):
@@ -13,7 +13,7 @@ class Reel2BitsBackend(ap.Backend):

def user_agent(self) -> str:
url = current_app.config["BASE_URL"]
return f"{requests.utils.default_user_agent()} " f"(reel2bits/{__VERSION__}; +{url})"
return f"{requests.utils.default_user_agent()} " f"(reel2bits/{VERSION}; +{url})"

def base_url(self):
return current_app.config["BASE_URL"]

+ 5
- 3
app.py View File

@@ -29,7 +29,9 @@ from activitypub.backend import Reel2BitsBackend

from celery import Celery

__VERSION__ = "0.0.1"
from version import VERSION

__VERSION__ = VERSION

try:
from raven.contrib.flask import Sentry
@@ -162,9 +164,9 @@ def create_app(config_filename="config.py", app_name=None, register_blueprints=T
flash(gettext("Config not found"), "error")

cfg = {
"REEL2BITS_VERSION_VER": __VERSION__,
"REEL2BITS_VERSION_VER": VERSION,
"REEL2BITS_VERSION_GIT": git_version,
"REEL2BITS_VERSION": "{0} ({1})".format(__VERSION__, git_version),
"REEL2BITS_VERSION": "{0} ({1})".format(VERSION, git_version),
"app_name": _config.app_name,
"app_description": _config.app_description,
}

+ 1
- 0
version.py View File

@@ -0,0 +1 @@
VERSION = "0.0.1"

Loading…
Cancel
Save