build: replace custom release script with release-please (#2817)
* build: replace custom release script with release-please * include package-name
This commit is contained in:
parent
3e06cc1072
commit
e7a678e91f
19 changed files with 102 additions and 203 deletions
|
@ -1,21 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Bump the version in the setup.py files.
|
||||
|
||||
set -u
|
||||
|
||||
error() {
|
||||
echo >&2 "error: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v sed > /dev/null || error "sed command not found!"
|
||||
|
||||
version="$1"
|
||||
|
||||
for setup_path in */setup.py; do
|
||||
sed --in-place \
|
||||
"s/version=\".*\",/version=\"$version\",/" \
|
||||
"$setup_path" ||
|
||||
error "could not bump version for $setup_path!"
|
||||
done
|
|
@ -1,25 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -u
|
||||
|
||||
error() {
|
||||
echo >&2 "error: $*"
|
||||
exit 1
|
||||
}
|
||||
|
||||
command -v git > /dev/null || error "git command not found!"
|
||||
command -v git-chglog > /dev/null || error "git-chglog command not found!"
|
||||
|
||||
changelog="CHANGELOG.md"
|
||||
tag="${tag:-$(git describe --abbrev=0 --tags || error "could not extract latest tag")}"
|
||||
|
||||
if grep --quiet "<a name=\"$tag\"></a>" "$changelog"; then
|
||||
error "changelog has already been generated for tag $tag!"
|
||||
fi
|
||||
|
||||
cat <(git-chglog "$tag") "$changelog" > "$changelog.tmp"
|
||||
mv "$changelog.tmp" "$changelog"
|
||||
|
||||
if command -v npx > /dev/null; then
|
||||
npx prettier --write "$changelog"
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue