1
0
mirror of https://github.com/home-assistant/core.git synced 2025-08-15 16:30:04 +00:00
Files
.devcontainer
.github
.vscode
docs
homeassistant
rootfs
script
hassfest
scaffold
translations
__init__.py
bootstrap
check_dirty
check_format
gen_requirements_all.py
inspect_schemas.py
lazytox.py
lint
monkeytype
release
run-in-env.sh
server
setup
test
update
version_bump.py
tests
.coveragerc
.dockerignore
.gitattributes
.gitignore
.hadolint.yaml
.ignore
.pre-commit-config.yaml
.prettierignore
.readthedocs.yml
.travis.yml
.yamllint
CLA.md
CODEOWNERS
CODE_OF_CONDUCT.md
CONTRIBUTING.md
Dockerfile
Dockerfile.dev
LICENSE.md
MANIFEST.in
README.rst
azure-pipelines-ci.yml
azure-pipelines-release.yml
azure-pipelines-translation.yml
azure-pipelines-wheels.yml
build.json
codecov.yml
pylintrc
pyproject.toml
requirements.txt
requirements_all.txt
requirements_docs.txt
requirements_test.txt
requirements_test_all.txt
requirements_test_pre_commit.txt
setup.cfg
setup.py
tox.ini
core/script/release
2019-01-20 17:31:09 -08:00

33 lines
689 B
Bash
Executable File

#!/bin/sh
# Pushes a new version to PyPi.
cd "$(dirname "$0")/.."
head -n 5 homeassistant/const.py | tail -n 1 | grep PATCH_VERSION > /dev/null
if [ $? -eq 1 ]
then
echo "Patch version not found on const.py line 5"
exit 1
fi
head -n 5 homeassistant/const.py | tail -n 1 | grep dev > /dev/null
if [ $? -eq 0 ]
then
echo "Release version should not contain dev tag"
exit 1
fi
CURRENT_BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ "$CURRENT_BRANCH" != "master" ] && [ "$CURRENT_BRANCH" != "rc" ]
then
echo "You have to be on the master or rc branch to release."
exit 1
fi
rm -rf dist build
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/* --skip-existing