From 31b7e49043d86c9b266590f6437146d625412f60 Mon Sep 17 00:00:00 2001 From: Devrim Date: Thu, 30 Jun 2022 10:53:02 +0300 Subject: [PATCH] fix: jans-cli download yaml files for build (#1635) --- jans-cli/setup.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/jans-cli/setup.py b/jans-cli/setup.py index f769117490c..ce163b0c6f0 100644 --- a/jans-cli/setup.py +++ b/jans-cli/setup.py @@ -8,6 +8,23 @@ import re from setuptools import setup from setuptools import find_packages +from setuptools.command.install import install +from urllib.request import urlretrieve + +class PostInstallCommand(install): + """Post-installation for installation mode.""" + def run(self): + install.run(self) + + urlretrieve( + 'https://raw.githubusercontent.com/JanssenProject/jans/main/jans-config-api/docs/jans-config-api-swagger.yaml', + os.path.join(self.install_lib, 'cli/jca.yaml') + ) + + urlretrieve( + 'https://raw.githubusercontent.com/JanssenProject/jans/main/jans-scim/server/src/main/resources/jans-scim-openapi.yaml', + os.path.join(self.install_lib, 'cli/scim.yaml') + ) def find_version(*file_paths): @@ -61,4 +78,7 @@ def find_version(*file_paths): "scim-cli=cli.config_cli:main", ], }, + cmdclass={ + 'install': PostInstallCommand, + }, )