web: improve api client versioning
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
e998919097
commit
9469f86f65
4
Makefile
4
Makefile
|
@ -2,7 +2,7 @@
|
||||||
PWD = $(shell pwd)
|
PWD = $(shell pwd)
|
||||||
UID = $(shell id -u)
|
UID = $(shell id -u)
|
||||||
GID = $(shell id -g)
|
GID = $(shell id -g)
|
||||||
TIMESTAMP = $(shell date "+%s")
|
NPM_VERSION = $(shell python -m scripts.npm_version)
|
||||||
|
|
||||||
all: lint-fix lint test gen
|
all: lint-fix lint test gen
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ gen-web:
|
||||||
-i /local/schema.yml \
|
-i /local/schema.yml \
|
||||||
-g typescript-fetch \
|
-g typescript-fetch \
|
||||||
-o /local/web-api \
|
-o /local/web-api \
|
||||||
--additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${TIMESTAMP}.0.0
|
--additional-properties=typescriptThreePlus=true,supportsES6=true,npmName=@goauthentik/api,npmVersion=${NPM_VERSION}
|
||||||
|
|
||||||
gen-outpost:
|
gen-outpost:
|
||||||
docker run \
|
docker run \
|
||||||
|
|
6
scripts/npm_version.py
Normal file
6
scripts/npm_version.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
"""Helper script to generate an NPM Version"""
|
||||||
|
from time import time
|
||||||
|
|
||||||
|
from authentik import __version__
|
||||||
|
|
||||||
|
print("%s-%d" % (__version__, time()))
|
|
@ -46,7 +46,7 @@
|
||||||
"@babel/preset-env": "^7.15.0",
|
"@babel/preset-env": "^7.15.0",
|
||||||
"@babel/preset-typescript": "^7.15.0",
|
"@babel/preset-typescript": "^7.15.0",
|
||||||
"@fortawesome/fontawesome-free": "^5.15.4",
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
||||||
"@goauthentik/api": "^1629704636.0.0",
|
"@goauthentik/api": "^2021.8.1-rc1+1629705955",
|
||||||
"@lingui/cli": "^3.10.2",
|
"@lingui/cli": "^3.10.2",
|
||||||
"@lingui/core": "^3.10.4",
|
"@lingui/core": "^3.10.4",
|
||||||
"@lingui/macro": "^3.10.2",
|
"@lingui/macro": "^3.10.2",
|
||||||
|
|
Reference in a new issue