Skip to content

Commit

Permalink
chore(ci): skip branch check in script (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrynhard authored Jul 22, 2017
1 parent 6cece44 commit ba44e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
10 changes: 4 additions & 6 deletions .conform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ script:
set -e
# Check if the branch is a master.
if [[ "{{ .Git.Branch }}" != "master" ]]; then
echo "Branch '{{ .Git.Branch }}' is not 'master'"
if [[ "${TRAVIS_BRANCH}" != "master" ]] || [[ -z "${TRAVIS_TAG}" ]]; then
exit 0
fi
Expand All @@ -47,13 +45,13 @@ script:
exit 0
fi
# Check if tag is a prerelease.
# Check if the tag is a prerelease.
if [[ "{{ .Version.IsPrerelease }}" == "true" ]]; then
echo "Prerelease {{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}-{{ .Version.Prerelease }}"
echo "Publishing prerelease {{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}-{{ .Version.Prerelease }}"
docker tag {{ .Docker.Image }} {{ .Repository }}:{{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}-{{ .Version.Prerelease }}
docker push {{ .Repository }}:{{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}-{{ .Version.Prerelease }}
else
echo "Release {{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}"
echo "Publishing release {{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}"
docker tag {{ .Docker.Image }} {{ .Repository }}:{{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}
docker push {{ .Repository }}:{{ .Version.Major }}.{{ .Version.Minor }}.{{ .Version.Patch }}
docker tag {{ .Docker.Image }} {{ .Repository }}:latest
Expand Down
12 changes: 0 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,3 @@ script:

after_success:
- bash <(curl -s https://codecov.io/bash)

deploy:
- provider: script
script: conform enforce
skip_cleanup: true
on:
branch: master
- provider: script
script: conform enforce
skip_cleanup: true
on:
tags: true

0 comments on commit ba44e03

Please sign in to comment.