Skip to content

Commit 820de98

Browse files
committed
more controlled release process. if is tag, push that version. if is tag and is latest version (set in travis env) push both the version, and latest tags
1 parent ce0da9f commit 820de98

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ language: bash
88

99
before_install:
1010
- docker info
11-
- make build
11+
- VERSION="$TRAVIS_BRANCH" make build
1212
- docker build -t test:local ./Test
1313

1414
script:
@@ -18,5 +18,9 @@ script:
1818
after_success:
1919
- if [ "$TRAVIS_TAG" != "" ]; then
2020
docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
21-
make release;
21+
if [ "$TRAVIS_TAG" == "$LATEST" ]; then
22+
VERSION="$TRAVIS_TAG" make tag_latest;
23+
VERSION="latest" make release;
24+
fi
25+
VERSION="$TRAVIS_TAG" make release;
2226
fi

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ tag_latest:
9797
docker tag $(NAME)/standalone-chrome-debug:$(VERSION) $(NAME)/standalone-chrome-debug:latest
9898
docker tag $(NAME)/standalone-firefox-debug:$(VERSION) $(NAME)/standalone-firefox-debug:latest
9999

100-
release: tag_latest
100+
release:
101101
@if ! docker images $(NAME)/base | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/base version $(VERSION) is not yet built. Please run 'make build'"; false; fi
102102
@if ! docker images $(NAME)/hub | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/hub version $(VERSION) is not yet built. Please run 'make build'"; false; fi
103103
@if ! docker images $(NAME)/node-base | awk '{ print $$2 }' | grep -q -F $(VERSION); then echo "$(NAME)/node-base version $(VERSION) is not yet built. Please run 'make build'"; false; fi
@@ -121,7 +121,6 @@ release: tag_latest
121121
docker push $(NAME)/standalone-firefox
122122
docker push $(NAME)/standalone-chrome-debug
123123
docker push $(NAME)/standalone-firefox-debug
124-
@echo "*** Don't forget to create a tag. git tag rel-$(VERSION) && git push origin rel-$(VERSION)"
125124

126125
test:
127126
./test.sh

0 commit comments

Comments
 (0)