-
-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathci-prepare-cmd.sh
More file actions
22 lines (17 loc) · 669 Bytes
/
Copy pathci-prepare-cmd.sh
File metadata and controls
22 lines (17 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -x
set -e
VERSION=$1
bumpversion --allow-dirty --no-commit --no-tag --new-version "$VERSION" patch
# Clean up the files touched by bumpversion
set +e # Allow failure; if files are modified, prek returns an exit code > 0
# We need to run using the root config otherwise prek will read test fixtures and think this is a monorepo
prek run --all-files --config .pre-commit-config.yaml end-of-file-fixer trailing-whitespace prettier
set -e
rm -rf dist/
uv build
# https://twine.readthedocs.io/en/latest/#twine-check
twine check dist/*
# Hide the token
set +x
uv publish --publish-url https://test.pypi.org/legacy/ --token "$PYPI_TEST_PASSWORD"