-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
build/ | ||
dist/ | ||
*.egg-info/ | ||
__pycache__ | ||
pypi.*key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
if [[ ! -d .git ]]; then | ||
echo "$0 must be run from the project root" | ||
exit 1 | ||
fi | ||
rm -rf dist build soundcraft_utils.egg-info | ||
if [[ $VERSION_SUFFIX ]]; then | ||
echo "Overriding version with $VERSION_SUFFIX" | ||
ORIG=soundcraft/__init__.py | ||
BAK=${ORIG}.bak | ||
if [[ -f $BAK ]]; then | ||
echo "$BAK already exists" | ||
exit 1 | ||
fi | ||
sed -i.bak -e "s/^\\(__version__ = ['\"][^'\"]*\\)/\\1$VERSION_SUFFIX/" $ORIG | ||
fi | ||
python3 setup.py sdist bdist_wheel | ||
[[ -f $BAK ]] && mv $BAK $ORIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
TOOLS=$(dirname $0) | ||
grep version soundcraft/__init__.py | ||
echo -n "About to release; are you sure? [y/N] " | ||
read answer | ||
if [[ ! $answer =~ ^[yY] ]]; then | ||
echo "Exiting" | ||
exit 1 | ||
fi | ||
$TOOLS/dist.sh || exit 1 | ||
python3 -m twine upload --user __token__ --password $(<$TOOLS/pypi.realkey) dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
TOOLS=$(dirname $0) | ||
export VERSION_SUFFIX=$1 | ||
if [[ ! $VERSION_SUFFIX ]]; then | ||
echo "usage: $0 [a1|b1|rc1]" | ||
exit 1 | ||
fi | ||
if [[ ! $VERSION_SUFFIX =~ ^(a|b|rc)[0-9]+$ ]]; then | ||
echo "Suffix must be one of:" | ||
echo " a2" | ||
echo " b5" | ||
echo " rc1" | ||
exit 2 | ||
fi | ||
$TOOLS/dist.sh || exit 1 | ||
python3 -m twine upload --user __token__ --password $(<$TOOLS/pypi.testkey) --repository-url https://test.pypi.org/legacy/ dist/* |