Skip to content

Commit

Permalink
Travis tag building.
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Nov 26, 2019
1 parent 0478971 commit 5a9ed3e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- stage: deploy
python: '3.6'
script: ./.travis/deploy.sh
if: type != pull_request AND branch IN (dev, master)
if: type != pull_request AND (branch IN (dev, master) OR tag IS present)
addons:
apt:
sources:
Expand Down
14 changes: 11 additions & 3 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,19 @@

set -e

if [ "$TRAVIS_PULL_REQUEST" == "true" ]; then
echo "We should not deploy pull requests!"
exit 1
fi

if [ -z "$TRAVIS_TAG" ]; then
DOCKER_IMAGE_TAG=$(if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo "$TRAVIS_BRANCH-latest"; fi)
else
DOCKER_IMAGE_TAG="$TRAVIS_TAG"
fi

echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
DOCKER_IMAGE_TAG=$(if [ "$BRANCH" == "master" ]; then echo "latest"; else echo "$BRANCH-latest"; fi)

export BRANCH
export DOCKER_IMAGE_TAG
export DOCKER_CLI_EXPERIMENTAL=enabled

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="paradox-alarm-interface",
version="0.1",
version="1.0.0",
author="João Paulo Barraca",
author_email="[email protected]",
description="Interface to Paradox Alarm Panels",
Expand Down

0 comments on commit 5a9ed3e

Please sign in to comment.