Skip to content

Commit

Permalink
Fix README.rst symlink in GitHub release asset
Browse files Browse the repository at this point in the history
Fixes the symlink in the GitHub tar.gz release asset created during a
release. This symlink links to the README.txt file in the same directory
and should be preserved to the same target when extracting.

Signed-off-by: Jordan Borean <jborean93@gmail.com>
  • Loading branch information
jborean93 committed Oct 10, 2021
1 parent 3983aff commit e2711d4
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion ci/before-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,22 @@ fi

PKG_NAME_VER="python-gssapi-${PYTHON_GSSAPI_VERSION}"

tar -czvf ./tag_build/${PKG_NAME_VER}.tar.gz --exclude='dist' --exclude='tag_build' --exclude='.git' --exclude='travis_docs_build' --exclude='.git' --transform "s,^\.,${PKG_NAME_VER}," .
tar -cvf ./tag_build/${PKG_NAME_VER}.tar \
--exclude='dist' \
--exclude='tag_build' \
--exclude='.git' \
--exclude='travis_docs_build' \
--exclude='README.rst' \
--transform="s,^\.,${PKG_NAME_VER}," .

# --transform clobbers symlink so add it last using Python
python - << EOF
import tarfile
with tarfile.open("tag_build/${PKG_NAME_VER}.tar", mode="a:") as tf:
tf.add("README.rst", arcname="${PKG_NAME_VER}/README.rst")
EOF

gzip ./tag_build/${PKG_NAME_VER}.tar

sha512sum --binary ./tag_build/${PKG_NAME_VER}.tar.gz > ./tag_build/${PKG_NAME_VER}.sha512sum

0 comments on commit e2711d4

Please sign in to comment.