Skip to content

Commit

Permalink
release.org fix packagename - -> _ coersion issue for artifacts
Browse files Browse the repository at this point in the history
was already fixed for the releases to pip, but not for internal

also pass $REST to bdist_wheel not $@ to match what we pass sdist
  • Loading branch information
tgbugs committed Aug 28, 2020
1 parent d46ef22 commit fc5c154
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/release.org
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ build-release () {
pushd dist/
tar xvzf ${packagename}-${version}.tar.gz
pushd ./${packagename}-${version}/
python setup.py bdist_wheel $@
python setup.py bdist_wheel $REST
mv dist/*.whl ../
popd # from ./${packagename}-${version}/
rm -r ./${packagename}-${version}/
Expand All @@ -204,7 +204,7 @@ build-release () {
## testing
if [[ -z ${NO_TEST} ]]; then
unset PYTHONPATH
cp dist/${packagename}-${version}* "${TEST_PATH}"
cp dist/${packagename//-/*}-${version}* "${TEST_PATH}"

pushd "${TEST_PATH}"
tar xvzf ${packagename}-${version}.tar.gz
Expand Down Expand Up @@ -291,7 +291,7 @@ build-release () {
if [ ! -d "${ARTIFACT_FOLDER}/${packagename}" ]; then
mkdir -p "${ARTIFACT_FOLDER}/${packagename}"
fi
cp "${folder}"/dist/${packagename}-${version}* "${ARTIFACT_FOLDER}/${packagename}"
cp "${folder}"/dist/${packagename//-/*}-${version}* "${ARTIFACT_FOLDER}/${packagename}"
echo "build artifacts have been copied to ${ARTIFACT_FOLDER}/${packagename}"
fi

Expand All @@ -300,7 +300,7 @@ build-release () {
if [[ -n ${KEEP_ARTIFACTS} ]]; then
echo "$(color yellow)keeping artifacts$(color off)"
elif [[ -n ${CLONEFROM} || ${BRANCH} ]]; then
rm ${folder}/dist/${packagename}-${version}*
rm ${folder}/dist/${packagename//-/*}-${version}*
if [[ -n ${CLONEFROM} ]]; then
echo "$(color yellow)release build was cloned from a local source$(color off) ${CLONEFROM}"
else
Expand Down Expand Up @@ -330,10 +330,10 @@ function push-release () {

# NOTE Always deploy from ${folder}/dist NOT from ARTIFACT_FOLDER
# This prevents accidental release of testing builds
rsync -a -v --ignore-existing ${folder}/dist/${packagename/-/*}-${version}{-,.tar}* ${software_releases_path}/ || return $?
rsync -a -v --ignore-existing ${folder}/dist/${packagename//-/*}-${version}{-,.tar}* ${software_releases_path}/ || return $?
pushd ${software_releases_path}
sha256sum ${packagename/-/*}-${version}{-,.tar}* >> hashes
twine upload --repository test ${packagename/-/*}-${version}{-,.tar}* || return $?
sha256sum ${packagename//-/*}-${version}{-,.tar}* >> hashes
twine upload --repository test ${packagename//-/*}-${version}{-,.tar}* || return $?
sleep 1
echo "test pypi hashes"
curl https://test.pypi.org/pypi/${packagename}/json | python -m json.tool | grep "\(sha256\|filename\)" | grep -B1 "${version}" | awk '{ gsub(/"/, "", $2); printf("%s ", $2) }' | sed 's/,\ /\n/g'
Expand Down

0 comments on commit fc5c154

Please sign in to comment.