Skip to content

Commit

Permalink
fix: validate release before committing and uploading it
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Dec 9, 2023
1 parent 3b0c08c commit 878713a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions release
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,23 @@ if [ -f docs/conf.py ]; then git add docs/conf.py; fi
echo -e "${YELLOW}--->${COLOR_OFF} Creating release"
git commit -q -m "Release version $next_version"

if [[ "$PUBLIC" == "true" ]]; then
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release files"
cp README.rst README
python setup.py sdist bdist_wheel >/dev/null

echo -e "${YELLOW}--->${COLOR_OFF} Validating long_description"
twine check dist/*
fi

echo -e "${YELLOW}--->${COLOR_OFF} Tagging release"
git tag -a $next_version -m "Release version $next_version"

echo -e "${YELLOW}--->${COLOR_OFF} Pushing release and tags to github"
git push -q origin master && git push -q --tags

if [[ "$PUBLIC" == "true" ]]; then
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
cp README.rst README
python setup.py sdist bdist_wheel >/dev/null
echo -e "${YELLOW}--->${COLOR_OFF} Uploading python release"
twine upload dist/*
rm README
fi
Expand Down

0 comments on commit 878713a

Please sign in to comment.