From c70cbba2f33a37e39a04a69e67f7004809aa2a0a Mon Sep 17 00:00:00 2001 From: Alexey Snigir Date: Mon, 13 Nov 2023 18:39:34 +0100 Subject: [PATCH 1/2] vizro_ai support in whl file check --- .github/workflows/check-release.yml | 8 +++- .../20231113_183619_alexey_snigir.md | 48 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 vizro-ai/changelog.d/20231113_183619_alexey_snigir.md diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index b0dd084ad..548583904 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -81,11 +81,15 @@ jobs: password: ${{ env.PYPI_TOKEN }} - name: Check correct package uploaded to PyPI run: | + if [ "${{ needs.check-version.outputs.package_name }}" == "vizro-ai" ]; then + export package_name=vizro_ai + else export package_name=${{ needs.check-version.outputs.package_name }} + fi cd "${{ needs.check-version.outputs.package_name }}/dist" - local=$(md5sum ${{ needs.check-version.outputs.package_name }}-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) + local=$(md5sum "$package_name"-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) cd .. pip download ${{ needs.check-version.outputs.package_name }}==${{needs.check-version.outputs.package_version}} -d . --no-deps --timeout 300 - pypi=$(md5sum ${{ needs.check-version.outputs.package_name }}-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) + pypi=$(md5sum "$package_name"-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) if [[ $local = $pypi ]]; then echo "md5 hash is the same"; else echo "md5 hash is not the same"; exit 1; fi version-bump: diff --git a/vizro-ai/changelog.d/20231113_183619_alexey_snigir.md b/vizro-ai/changelog.d/20231113_183619_alexey_snigir.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-ai/changelog.d/20231113_183619_alexey_snigir.md @@ -0,0 +1,48 @@ + + + + + + + + + From b55258f2fe6d3f137a749c5b27622c4fa72f07b6 Mon Sep 17 00:00:00 2001 From: Alexey Snigir Date: Tue, 14 Nov 2023 12:39:26 +0100 Subject: [PATCH 2/2] review fix --- .github/workflows/check-release.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 548583904..0a76fe8f7 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -30,10 +30,15 @@ jobs: echo "new_release=${{ env.NEW_RELEASE }}" >> $GITHUB_OUTPUT echo "package_name=${{ env.PACKAGE_NAME }}" >> $GITHUB_OUTPUT echo "package_version=${{ env.PACKAGE_VERSION }}" >> $GITHUB_OUTPUT + if [ "${{ env.PACKAGE_NAME }}" == "vizro-ai" ]; then + echo "dist_package_name=vizro_ai" >> $GITHUB_OUTPUT + else echo "dist_package_name=${{ needs.check-version.outputs.package_name }}" >> $GITHUB_OUTPUT + fi outputs: new_release: ${{ steps.version_check.outputs.new_release }} package_name: ${{ steps.version_check.outputs.package_name }} package_version: ${{ steps.version_check.outputs.package_version }} + dist_package_name: ${{ steps.version_check.outputs.dist_package_name }} build-publish: needs: [check-version] @@ -81,15 +86,11 @@ jobs: password: ${{ env.PYPI_TOKEN }} - name: Check correct package uploaded to PyPI run: | - if [ "${{ needs.check-version.outputs.package_name }}" == "vizro-ai" ]; then - export package_name=vizro_ai - else export package_name=${{ needs.check-version.outputs.package_name }} - fi cd "${{ needs.check-version.outputs.package_name }}/dist" - local=$(md5sum "$package_name"-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) + local=$(md5sum ${{ needs.check-version.outputs.dist_package_name }}-${{ needs.check-version.outputs.package_version }}-py3-none-any.whl) cd .. - pip download ${{ needs.check-version.outputs.package_name }}==${{needs.check-version.outputs.package_version}} -d . --no-deps --timeout 300 - pypi=$(md5sum "$package_name"-${{needs.check-version.outputs.package_version}}-py3-none-any.whl) + pip download ${{ needs.check-version.outputs.package_name }}==${{ needs.check-version.outputs.package_version }} -d . --no-deps --timeout 300 + pypi=$(md5sum ${{ needs.check-version.outputs.dist_package_name }}-${{ needs.check-version.outputs.package_version }}-py3-none-any.whl) if [[ $local = $pypi ]]; then echo "md5 hash is the same"; else echo "md5 hash is not the same"; exit 1; fi version-bump: