11NAME := selenium
2- VERSION := $(or $(VERSION ) ,$(VERSION ) ,' 3.0.1-aluminum' )
2+ VERSION := $(or $(VERSION ) ,$(VERSION ) ,3.0.1-barium )
33PLATFORM := $(shell uname -s)
44BUILD_ARGS := $(BUILD_ARGS )
5+ MAJOR: =$(word 1,$(subst ., ,$(VERSION ) ) )
6+ MINOR: =$(word 2,$(subst ., ,$(VERSION ) ) )
57
68all : hub chrome firefox chrome_debug firefox_debug standalone_chrome standalone_firefox standalone_chrome_debug standalone_firefox_debug
79
@@ -97,7 +99,31 @@ tag_latest:
9799 docker tag $(NAME ) /standalone-chrome-debug:$(VERSION ) $(NAME ) /standalone-chrome-debug:latest
98100 docker tag $(NAME ) /standalone-firefox-debug:$(VERSION ) $(NAME ) /standalone-firefox-debug:latest
99101
100- release :
102+ tag_major_minor :
103+ docker tag $(NAME ) /base:$(VERSION ) $(NAME ) /base:$(MAJOR )
104+ docker tag $(NAME ) /hub:$(VERSION ) $(NAME ) /hub:$(MAJOR )
105+ docker tag $(NAME ) /node-base:$(VERSION ) $(NAME ) /node-base:$(MAJOR )
106+ docker tag $(NAME ) /node-chrome:$(VERSION ) $(NAME ) /node-chrome:$(MAJOR )
107+ docker tag $(NAME ) /node-firefox:$(VERSION ) $(NAME ) /node-firefox:$(MAJOR )
108+ docker tag $(NAME ) /node-chrome-debug:$(VERSION ) $(NAME ) /node-chrome-debug:$(MAJOR )
109+ docker tag $(NAME ) /node-firefox-debug:$(VERSION ) $(NAME ) /node-firefox-debug:$(MAJOR )
110+ docker tag $(NAME ) /standalone-chrome:$(VERSION ) $(NAME ) /standalone-chrome:$(MAJOR )
111+ docker tag $(NAME ) /standalone-firefox:$(VERSION ) $(NAME ) /standalone-firefox:$(MAJOR )
112+ docker tag $(NAME ) /standalone-chrome-debug:$(VERSION ) $(NAME ) /standalone-chrome-debug:$(MAJOR )
113+ docker tag $(NAME ) /standalone-firefox-debug:$(VERSION ) $(NAME ) /standalone-firefox-debug:$(MAJOR )
114+ docker tag $(NAME ) /base:$(VERSION ) $(NAME ) /base:$(MAJOR ) .$(MINOR )
115+ docker tag $(NAME ) /hub:$(VERSION ) $(NAME ) /hub:$(MAJOR ) .$(MINOR )
116+ docker tag $(NAME ) /node-base:$(VERSION ) $(NAME ) /node-base:$(MAJOR ) .$(MINOR )
117+ docker tag $(NAME ) /node-chrome:$(VERSION ) $(NAME ) /node-chrome:$(MAJOR ) .$(MINOR )
118+ docker tag $(NAME ) /node-firefox:$(VERSION ) $(NAME ) /node-firefox:$(MAJOR ) .$(MINOR )
119+ docker tag $(NAME ) /node-chrome-debug:$(VERSION ) $(NAME ) /node-chrome-debug:$(MAJOR ) .$(MINOR )
120+ docker tag $(NAME ) /node-firefox-debug:$(VERSION ) $(NAME ) /node-firefox-debug:$(MAJOR ) .$(MINOR )
121+ docker tag $(NAME ) /standalone-chrome:$(VERSION ) $(NAME ) /standalone-chrome:$(MAJOR ) .$(MINOR )
122+ docker tag $(NAME ) /standalone-firefox:$(VERSION ) $(NAME ) /standalone-firefox:$(MAJOR ) .$(MINOR )
123+ docker tag $(NAME ) /standalone-chrome-debug:$(VERSION ) $(NAME ) /standalone-chrome-debug:$(MAJOR ) .$(MINOR )
124+ docker tag $(NAME ) /standalone-firefox-debug:$(VERSION ) $(NAME ) /standalone-firefox-debug:$(MAJOR ) .$(MINOR )
125+
126+ release : tag_major_minor
101127 @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
102128 @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
103129 @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,6 +147,32 @@ release:
121147 docker push $(NAME ) /standalone-firefox:$(VERSION )
122148 docker push $(NAME ) /standalone-chrome-debug:$(VERSION )
123149 docker push $(NAME ) /standalone-firefox-debug:$(VERSION )
150+ docker push $(NAME ) /base:$(MAJOR )
151+ docker push $(NAME ) /hub:$(MAJOR )
152+ docker push $(NAME ) /node-base:$(MAJOR )
153+ docker push $(NAME ) /node-chrome:$(MAJOR )
154+ docker push $(NAME ) /node-firefox:$(MAJOR )
155+ docker push $(NAME ) /node-chrome-debug:$(MAJOR )
156+ docker push $(NAME ) /node-firefox-debug:$(MAJOR )
157+ docker push $(NAME ) /standalone-chrome:$(MAJOR )
158+ docker push $(NAME ) /standalone-chrome:$(MAJOR )
159+ docker push $(NAME ) /standalone-firefox:$(MAJOR )
160+ docker push $(NAME ) /standalone-chrome-debug:$(MAJOR )
161+ docker push $(NAME ) /standalone-firefox-debug:$(MAJOR )
162+ docker push $(NAME ) /base:$(MAJOR ) .$(MINOR )
163+ docker push $(NAME ) /hub:$(MAJOR ) .$(MINOR )
164+ docker push $(NAME ) /node-base:$(MAJOR ) .$(MINOR )
165+ docker push $(NAME ) /node-chrome:$(MAJOR ) .$(MINOR )
166+ docker push $(NAME ) /node-firefox:$(MAJOR ) .$(MINOR )
167+ docker push $(NAME ) /node-chrome-debug:$(MAJOR ) .$(MINOR )
168+ docker push $(NAME ) /node-firefox-debug:$(MAJOR ) .$(MINOR )
169+ docker push $(NAME ) /standalone-chrome:$(MAJOR ) .$(MINOR )
170+ docker push $(NAME ) /standalone-chrome:$(MAJOR ) .$(MINOR )
171+ docker push $(NAME ) /standalone-firefox:$(MAJOR ) .$(MINOR )
172+ docker push $(NAME ) /standalone-chrome-debug:$(MAJOR ) .$(MINOR )
173+ docker push $(NAME ) /standalone-firefox-debug:$(MAJOR ) .$(MINOR )
174+
175+
124176
125177test :
126178 ./test.sh
0 commit comments