mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 05:04:27 +00:00
Use semver
This commit is contained in:
parent
8bd86a8efe
commit
dbb024edbd
1 changed files with 8 additions and 1 deletions
|
@ -1,4 +1,5 @@
|
||||||
import os
|
import os
|
||||||
|
import subprocess
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
import bcrypt
|
import bcrypt
|
||||||
|
@ -16,7 +17,13 @@ ROOT_DIR = Path().parent.resolve()
|
||||||
|
|
||||||
_CONFIG_FILE = os.getenv("MICROBLOGPUB_CONFIG_FILE", "me.toml")
|
_CONFIG_FILE = os.getenv("MICROBLOGPUB_CONFIG_FILE", "me.toml")
|
||||||
|
|
||||||
VERSION = "2.0"
|
VERSION_COMMIT = (
|
||||||
|
subprocess.check_output(["git", "rev-parse", "--short=8", "HEAD"])
|
||||||
|
.split()[0]
|
||||||
|
.decode()
|
||||||
|
)
|
||||||
|
|
||||||
|
VERSION = f"2.0.0+{VERSION_COMMIT}"
|
||||||
USER_AGENT = f"microblogpub/{VERSION}"
|
USER_AGENT = f"microblogpub/{VERSION}"
|
||||||
AP_CONTENT_TYPE = "application/activity+json"
|
AP_CONTENT_TYPE = "application/activity+json"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue