root: explicitly set --user for codegen

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-16 23:14:51 +02:00
parent 626006725e
commit b13d6deda8
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,7 @@
.SHELLFLAGS += -x -e .SHELLFLAGS += -x -e
PWD = $(shell pwd) PWD = $(shell pwd)
UID = $(shell id -u)
GID = $(shell id -g)
all: lint-fix lint test gen all: lint-fix lint test gen
@ -31,6 +33,7 @@ gen-build:
gen-web: gen-web:
docker run \ docker run \
--rm -v ${PWD}:/local \ --rm -v ${PWD}:/local \
--user ${UID}:${GID} \
openapitools/openapi-generator-cli generate \ openapitools/openapi-generator-cli generate \
-i /local/schema.yml \ -i /local/schema.yml \
-g typescript-fetch \ -g typescript-fetch \
@ -41,6 +44,7 @@ gen-web:
gen-outpost: gen-outpost:
docker run \ docker run \
--rm -v ${PWD}:/local \ --rm -v ${PWD}:/local \
--user ${UID}:${GID} \
openapitools/openapi-generator-cli generate \ openapitools/openapi-generator-cli generate \
--git-host goauthentik.io \ --git-host goauthentik.io \
--git-repo-id outpost \ --git-repo-id outpost \

View File

@ -299,7 +299,6 @@ stages:
inputs: inputs:
script: | script: |
make gen-web make gen-web
sudo chmod 777 -R web/api/
cd web cd web
cd api && npm i && cd .. cd api && npm i && cd ..
npm i npm i