1
0
mirror of https://github.com/github/octodns.git synced 2024-05-11 05:55:00 +00:00

Refactor shell script syntax and consistency

- Add a missing space for styling
- Replace legacy "\`...\`" with `$(...)`
- Quote variable to prevent word splitting
- Use builtin `command -v` instead of non-standard `which`
- Add two missing `>&2` redirection for error/warning message
This commit is contained in:
Peter Dave Hello
2019-04-07 00:53:55 +08:00
parent a0bd756c09
commit a516f2ca7c
4 changed files with 13 additions and 13 deletions

View File

@@ -2,7 +2,7 @@
set -e
cd "$(dirname $0)"/..
cd "$(dirname "$0")"/..
ROOT=$(pwd)
if [ -z "$VENV_NAME" ]; then
@@ -16,10 +16,10 @@ if [ ! -f "$ACTIVATE" ]; then
fi
. "$ACTIVATE"
VERSION=$(grep __VERSION__ $ROOT/octodns/__init__.py | sed -e "s/.* = '//" -e "s/'$//")
VERSION="$(grep __VERSION__ "$ROOT/octodns/__init__.py" | sed -e "s/.* = '//" -e "s/'$//")"
git tag -s v$VERSION -m "Release $VERSION"
git push origin v$VERSION
git tag -s "v$VERSION" -m "Release $VERSION"
git push origin "v$VERSION"
echo "Tagged and pushed v$VERSION"
python setup.py sdist
twine upload dist/*$VERSION.tar.gz