Skip to content

Commit 878713a

Browse files
committed
fix: validate release before committing and uploading it
1 parent 3b0c08c commit 878713a

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

release

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,23 @@ if [ -f docs/conf.py ]; then git add docs/conf.py; fi
118118
echo -e "${YELLOW}--->${COLOR_OFF} Creating release"
119119
git commit -q -m "Release version $next_version"
120120

121+
if [[ "$PUBLIC" == "true" ]]; then
122+
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release files"
123+
cp README.rst README
124+
python setup.py sdist bdist_wheel >/dev/null
125+
126+
echo -e "${YELLOW}--->${COLOR_OFF} Validating long_description"
127+
twine check dist/*
128+
fi
129+
121130
echo -e "${YELLOW}--->${COLOR_OFF} Tagging release"
122131
git tag -a $next_version -m "Release version $next_version"
123132

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

127136
if [[ "$PUBLIC" == "true" ]]; then
128-
echo -e "${YELLOW}--->${COLOR_OFF} Creating python release"
129-
cp README.rst README
130-
python setup.py sdist bdist_wheel >/dev/null
137+
echo -e "${YELLOW}--->${COLOR_OFF} Uploading python release"
131138
twine upload dist/*
132139
rm README
133140
fi

0 commit comments

Comments
 (0)