From c4397dad30c3d06071bc85be3df88f5b4a502131 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Mon, 11 Oct 2021 06:52:55 +1000 Subject: [PATCH] Final fix for building release GitHub asset Signed-off-by: Jordan Borean --- .github/workflows/release.yml | 3 --- ci/before-deploy.sh | 20 +++++++------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3f65b3a2..226253a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,9 +8,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Setup Python - uses: actions/setup-python@v2 - - name: Check out code uses: actions/checkout@v2 diff --git a/ci/before-deploy.sh b/ci/before-deploy.sh index 12a3a1c5..1465a3b9 100755 --- a/ci/before-deploy.sh +++ b/ci/before-deploy.sh @@ -12,26 +12,18 @@ yum -y install tar git # build the docs deploy::build-docs -# NB(directxman12): this is a *terrible* hack, but basically, -# `twine` gets called like this: -# - python setup.py $PYPI_DISTRIBUTIONS -# - twine upload -r pypi dist/* -# - [some other stuff] -# -# so if we set $PYPI_DISTRIBUTIONS to something harmless, like `check`, -# and then build the dist ourselves (and save it from the cleanup), -# dpl will upload that - -# build the sdist +# build the sdist and save the dirs before the clean python setup.py sdist mv dist dist_saved +mv .venv .venv_saved # for the tarball upload # clean up -git clean -Xdf +git clean -Xdf --exclude .venv -# restore the saved "dist" directory +# restore the saved "dist"/".venv" directory mv dist_saved dist +mv .venv_saved .venv # make the dir rm -rf ./tag_build || true @@ -53,6 +45,7 @@ tar -cvf ./tag_build/${PKG_NAME_VER}.tar \ --exclude='tag_build' \ --exclude='.git' \ --exclude='travis_docs_build' \ + --exclude='.venv' \ --exclude='README.rst' \ --transform="s,^\.,${PKG_NAME_VER}," . @@ -67,3 +60,4 @@ EOF gzip ./tag_build/${PKG_NAME_VER}.tar sha512sum --binary ./tag_build/${PKG_NAME_VER}.tar.gz > ./tag_build/${PKG_NAME_VER}.sha512sum +