Merge pull request, while keeping -q --quiet flag.

Most changes were already included, only adjusted with black formatting.
This commit is contained in:
Halvor Holsten Strand
2023-10-09 12:01:32 +02:00
parent 125cfca05e
commit 7437e3abb1
10 changed files with 1058 additions and 999 deletions

12
release
View File

@@ -6,7 +6,7 @@ if [[ ! -f setup.py ]]; then
exit 1
fi
PACKAGE_NAME="$(cat setup.py | grep "name='" | head | cut -d "'" -f2)"
PACKAGE_NAME="$(cat setup.py | grep 'name="' | head | cut -d '"' -f2)"
INIT_PACKAGE_NAME="$(echo "${PACKAGE_NAME//-/_}")"
PUBLIC="true"
@@ -86,18 +86,12 @@ TMPFILE=$(mktemp /tmp/${tempfoo}.XXXXXX) || {
exit 1
}
find_this="__version__ = '$current_version'"
replace_with="__version__ = '$next_version'"
find_this="__version__ = \"$current_version\""
replace_with="__version__ = \"$next_version\""
echo -e "${YELLOW}--->${COLOR_OFF} Updating ${INIT_PACKAGE_NAME}/__init__.py"
sed "s/$find_this/$replace_with/" ${INIT_PACKAGE_NAME}/__init__.py > $TMPFILE && mv $TMPFILE ${INIT_PACKAGE_NAME}/__init__.py
find_this="${PACKAGE_NAME}.git@$current_version"
replace_with="${PACKAGE_NAME}.git@$next_version"
echo -e "${YELLOW}--->${COLOR_OFF} Updating README.rst"
sed "s/$find_this/$replace_with/" README.rst > $TMPFILE && mv $TMPFILE README.rst
if [ -f docs/conf.py ]; then
echo -e "${YELLOW}--->${COLOR_OFF} Updating docs"
find_this="version = '${current_version}'"