From 2de2632477e24e88db0d284e8ebf0e094cb9a555 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 10:50:20 +0000 Subject: [PATCH 1/5] .github/workflows/sdk-pr.yaml --- .github/workflows/sdk-pr.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sdk-pr.yaml b/.github/workflows/sdk-pr.yaml index 90a40b3..3de0c7a 100644 --- a/.github/workflows/sdk-pr.yaml +++ b/.github/workflows/sdk-pr.yaml @@ -12,7 +12,7 @@ env: jobs: main-go: - name: [Go] Update SDK Repo + name: "[Go] Update SDK Repo" runs-on: ubuntu-latest steps: - name: Install SSH Key @@ -40,7 +40,7 @@ jobs: run: | scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" main-python: - name: [Python] Update SDK Repo + name: "[Python] Update SDK Repo" runs-on: ubuntu-latest steps: - name: Install SSH Key From 4b542ad8118c8a097d3e9833da0cf059c28b1b5a Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 11:00:22 +0000 Subject: [PATCH 2/5] prevent replacement of readme and pyproject.toml --- scripts/generate-sdk/languages/python.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index c72d84f..afa49f1 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -124,6 +124,18 @@ generate_python_sdk() { cp -r ${sdk_services_backup_dir}/${service}/src/wait ${SERVICES_FOLDER}/${service}/src/wait fi + # If the service has a README.md file, move them inside the service folder + if [ -f ${sdk_services_backup_dir}/${service}/README.md ]; then + echo "Found ${service} \"README.md\" file" + cp -r ${sdk_services_backup_dir}/${service}/README.md ${SERVICES_FOLDER}/${service}/README.md + fi + + # If the service has a pyproject.toml file, move them inside the service folder + if [ -d ${sdk_services_backup_dir}/${service}/pyproject.toml ]; then + echo "Found ${service} \"pyproject.toml\" file" + cp -r ${sdk_services_backup_dir}/${service}/pyproject.toml ${SERVICES_FOLDER}/${service}/pyproject.toml + fi + # If the service has a CHANGELOG file, move it inside the service folder if [ -f ${sdk_services_backup_dir}/${service}/CHANGELOG.md ]; then echo "Found ${service} \"CHANGELOG\" file" From d75e32b9972983cd931a89b9948683fa4fe60730 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 11:01:20 +0000 Subject: [PATCH 3/5] prevent replacement of poetry.lock --- scripts/generate-sdk/languages/python.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/generate-sdk/languages/python.sh b/scripts/generate-sdk/languages/python.sh index afa49f1..fd0bbed 100644 --- a/scripts/generate-sdk/languages/python.sh +++ b/scripts/generate-sdk/languages/python.sh @@ -131,11 +131,17 @@ generate_python_sdk() { fi # If the service has a pyproject.toml file, move them inside the service folder - if [ -d ${sdk_services_backup_dir}/${service}/pyproject.toml ]; then + if [ -f ${sdk_services_backup_dir}/${service}/pyproject.toml ]; then echo "Found ${service} \"pyproject.toml\" file" cp -r ${sdk_services_backup_dir}/${service}/pyproject.toml ${SERVICES_FOLDER}/${service}/pyproject.toml fi + # If the service has a poetry.lock file, move them inside the service folder + if [ -f ${sdk_services_backup_dir}/${service}/poetry.lock ]; then + echo "Found ${service} \"poetry.lock\" file" + cp -r ${sdk_services_backup_dir}/${service}/poetry.lock ${SERVICES_FOLDER}/${service}/poetry.lock + fi + # If the service has a CHANGELOG file, move it inside the service folder if [ -f ${sdk_services_backup_dir}/${service}/CHANGELOG.md ]; then echo "Found ${service} \"CHANGELOG\" file" From e78385b05e526fa92117fe2b69bb1d23fbd9956b Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 11:07:19 +0000 Subject: [PATCH 4/5] fix installation after poetry change --- .github/workflows/ci.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 503980e..ee6968d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,6 +76,8 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install core run: | + pip install poetry + poetry config virtualenvs.create false git clone https://github.com/stackitcloud/stackit-sdk-python-core.git core cd core;make install-dev; - name: Lint From ab8beceeb8d2e1d7bc22305b03dad4bfbfa9f299 Mon Sep 17 00:00:00 2001 From: Melvin Klein Date: Tue, 5 Nov 2024 12:03:51 +0000 Subject: [PATCH 5/5] fix? --- .github/workflows/ci.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ee6968d..b0d0b1c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,7 +79,10 @@ jobs: pip install poetry poetry config virtualenvs.create false git clone https://github.com/stackitcloud/stackit-sdk-python-core.git core - cd core;make install-dev; + cd core;make install; + - name: Install sdk + working-directory: ./sdk-repo-updated + run: make install-dev - name: Lint working-directory: ./sdk-repo-updated run: make lint