Vašek Šraier
6 years ago
4 changed files with 7 additions and 35 deletions
@ -1,31 +0,0 @@ |
|||||
GITEA_URL=https://try.gitea.io/swagger.v1.json |
|
||||
BUILDDIR=tmp |
|
||||
|
|
||||
build: swagger_client clean_builddir pipenv_sync |
|
||||
|
|
||||
swagger_client: |
|
||||
mkdir -p "${BUILDDIR}" |
|
||||
swagger-codegen generate -i "${GITEA_URL}" -l python -o "${BUILDDIR}/gitea_api" |
|
||||
mv "${BUILDDIR}/gitea_api/swagger_client" . |
|
||||
rm -rf "${BUILDDIR}/gitea_api" |
|
||||
|
|
||||
# Protoze ten generator psali nejaci dementi, neumi to cyklicke reference |
|
||||
# je proto potreba zakomentovat dva importy |
|
||||
sed -i 's/from swagger_client\.models\.gpg_key import GPGKey/#from swagger_client.models.gpg_key import GPGKey/' swagger_client/models/gpg_key.py |
|
||||
sed -i 's/from swagger_client\.models\.repository import Repository/#from swagger_client.models.repository import Repository/' swagger_client/models/repository.py |
|
||||
|
|
||||
.PHONY: pipenv_sync |
|
||||
pipenv_sync: |
|
||||
pipenv sync |
|
||||
|
|
||||
.PHONY: clean_builddir |
|
||||
clean_builddir: |
|
||||
rm -rf ${BUILDDIR} |
|
||||
|
|
||||
.PHONY: clean |
|
||||
clean: |
|
||||
rm -rf swagger_client/ |
|
||||
rm -rf click/ |
|
||||
pipenv --rm |
|
||||
|
|
||||
|
|
Loading…
Reference in new issue