Skip to content

Commit e2711d4

Browse files
committed
Fix README.rst symlink in GitHub release asset
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 <[email protected]>
1 parent 3983aff commit e2711d4

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

ci/before-deploy.sh

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,22 @@ fi
4848

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

51-
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}," .
51+
tar -cvf ./tag_build/${PKG_NAME_VER}.tar \
52+
--exclude='dist' \
53+
--exclude='tag_build' \
54+
--exclude='.git' \
55+
--exclude='travis_docs_build' \
56+
--exclude='README.rst' \
57+
--transform="s,^\.,${PKG_NAME_VER}," .
58+
59+
# --transform clobbers symlink so add it last using Python
60+
python - << EOF
61+
import tarfile
62+
63+
with tarfile.open("tag_build/${PKG_NAME_VER}.tar", mode="a:") as tf:
64+
tf.add("README.rst", arcname="${PKG_NAME_VER}/README.rst")
65+
EOF
66+
67+
gzip ./tag_build/${PKG_NAME_VER}.tar
68+
5269
sha512sum --binary ./tag_build/${PKG_NAME_VER}.tar.gz > ./tag_build/${PKG_NAME_VER}.sha512sum

0 commit comments

Comments
 (0)