Skip to content

Commit

Permalink
web: improve api client versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Langhammer <[email protected]>
  • Loading branch information
BeryJu committed Aug 23, 2021
1 parent e998919 commit 9469f86
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
PWD = $(shell pwd)
UID = $(shell id -u)
GID = $(shell id -g)
TIMESTAMP = $(shell date "+%s")
NPM_VERSION = $(shell python -m scripts.npm_version)

all: lint-fix lint test gen

Expand Down Expand Up @@ -43,7 +43,7 @@ gen-web:
-i /local/schema.yml \
-g typescript-fetch \
-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:
docker run \
Expand Down
6 changes: 6 additions & 0 deletions scripts/npm_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
"""Helper script to generate an NPM Version"""
from time import time

from authentik import __version__

print("%s-%d" % (__version__, time()))
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@babel/preset-env": "^7.15.0",
"@babel/preset-typescript": "^7.15.0",
"@fortawesome/fontawesome-free": "^5.15.4",
"@goauthentik/api": "^1629704636.0.0",
"@goauthentik/api": "^2021.8.1-rc1+1629705955",
"@lingui/cli": "^3.10.2",
"@lingui/core": "^3.10.4",
"@lingui/macro": "^3.10.2",
Expand Down

0 comments on commit 9469f86

Please sign in to comment.