diff --git a/.github/template_gitref b/.github/template_gitref index 58dd8cbf4d..b5a481aa86 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-274-g4418509 +2021.08.26-276-g45ce134 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 096bf3681c..1de84f882c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -285,4 +285,16 @@ jobs: bash .github/workflows/scripts/publish_client_gem.sh - name: Create release on GitHub - run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }} + uses: actions/github-script@v7 + env: + TAG_NAME: ${{ inputs.release }} + with: + const { TAG_NAME } = process.env; + + script: | + await github.rest.repos.createRelease({ + owner: context.repo.owner, + repo: context.repo.repo, + tag_name: TAG_NAME, + make_latest: "legacy", + }); diff --git a/.github/workflows/scripts/script.sh b/.github/workflows/scripts/script.sh index f215c540e5..d6dba44033 100755 --- a/.github/workflows/scripts/script.sh +++ b/.github/workflows/scripts/script.sh @@ -52,11 +52,15 @@ password password # Some commands like ansible-galaxy specifically require 600 cmd_prefix bash -c "chmod 600 ~pulp/.netrc" -# Workaround: Domains are not supported by the published bindings. +# Infer the client name from the package name by replacing "-" with "_". +# Use the component to infer the package name on older versions of pulpcore. + if [ "$(echo "$REPORTED_STATUS" | jq -r '.domain_enabled')" = "true" ] then + # Workaround: Domains are not supported by the published bindings. + # Generate new bindings for all packages. pushd ../pulp-openapi-generator - for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[].package|sub("-"; "_")') + for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package // ("pulp_" + .component)|sub("pulp_core"; "pulpcore"))|sub("-"; "_")') do ./generate.sh "${item}" python cmd_prefix pip3 install "/root/pulp-openapi-generator/${item}-client" @@ -66,7 +70,7 @@ then else # Sadly: Different pulpcore-versions aren't either... pushd ../pulp-openapi-generator - for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.component!="core")|select(.component!="file").package|sub("-"; "_")') + for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.component!="core")|select(.component!="file")|(.package // ("pulp_" + .component)|sub("pulp_core"; "pulpcore"))|sub("-"; "_")') do ./generate.sh "${item}" python cmd_prefix pip3 install "/root/pulp-openapi-generator/${item}-client" @@ -75,7 +79,8 @@ else popd fi -echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt +# At this point, this is a safeguard only, so let's not make too much fuzz about the old status format. +echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.package)|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt" < unittest_requirements.txt cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt" < functest_requirements.txt cmd_stdin_prefix bash -c "cat > /tmp/bindings_requirements.txt" < bindings_requirements.txt diff --git a/docs/template_gitref b/docs/template_gitref index f86673d3bd..b5a481aa86 100644 --- a/docs/template_gitref +++ b/docs/template_gitref @@ -1 +1 @@ -2021.08.26-274-g6af418c +2021.08.26-276-g45ce134