Skip to content

Commit dfb6858

Browse files
committed
Fix auto bump
1 parent 380ff6b commit dfb6858

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

scripts/publish.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ set -euo pipefail
44
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
55
cd "$ROOT"
66

7+
backup_dir="$(mktemp -d)"
8+
cp pyproject.toml "$backup_dir/pyproject.toml"
9+
cp src/diffio/__init__.py "$backup_dir/__init__.py"
10+
11+
restore() {
12+
cp "$backup_dir/pyproject.toml" pyproject.toml
13+
cp "$backup_dir/__init__.py" src/diffio/__init__.py
14+
rm -rf "$backup_dir"
15+
}
16+
17+
trap restore EXIT
18+
719
python scripts/bump_version.py "${1:-patch}"
820
python -m build
921
python -m twine upload dist/*

0 commit comments

Comments
 (0)