@@ -201,63 +201,63 @@ case $1 in
201201
202202 # install docker images for new onine-medley release
203203 medley)
204+
205+ image=ghcr.io/interlisp/online-medley
206+
204207 case " I$2 I" in
205208
206209
207210 IpulldevI)
208- olddev=$( docker images -q ghcr.io/interlisp/online-medley:development)
209- docker pull ghcr.io/interlisp/online-medley:development
210- newdev=$( docker images -q ghcr.io/interlisp/online-medley:development)
211- if [ -n " ${olddev} " ] && [ " ${olddev} " != " ${newdev} " ]
212- then
213- docker image rm ${olddev}
214- fi
211+ image=ghcr.io/interlisp/online-medley
212+ docker image tag ${image} :development ${image} :2bdeleted
213+ docker pull ${image} :development
214+ docker image rm ${image} :2bdeleted
215215 echo " Online-medley development release pulled from Github Container Registry"
216216 ;;
217217
218218 Idev2prodI)
219- if [ -z " $( docker images -q ghcr.io/interlisp/online-medley :development) " ]
219+ if [ -z " $( docker images -q ${image} :development) " ]
220220 then
221- echo " ERROR: docker image \" ghcr.io/interlisp/online-medley :development\" does not exist."
221+ echo " ERROR: docker image \" ${image} :development\" does not exist."
222222 exit 1
223223 fi
224- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production-3) " ]
224+ if [ -n " $( docker images -q ${image} :production-3) " ]
225225 then
226- docker image rm ghcr.io/interlisp/online-medley :production-3
226+ docker image rm ${image} :production-3
227227 fi
228- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production-2) " ]
228+ if [ -n " $( docker images -q ${image} :production-2) " ]
229229 then
230- docker tag ghcr.io/interlisp/online-medley :production-2 ghcr.io/interlisp/online-medley :production-3
230+ docker tag ${image} :production-2 ${image} :production-3
231231 fi
232- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production-1) " ]
232+ if [ -n " $( docker images -q ${image} :production-1) " ]
233233 then
234- docker tag ghcr.io/interlisp/online-medley :production-1 ghcr.io/interlisp/online-medley :production-2
234+ docker tag ${image} :production-1 ${image} :production-2
235235 fi
236- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production) " ]
236+ if [ -n " $( docker images -q ${image} :production) " ]
237237 then
238- docker tag ghcr.io/interlisp/online-medley :production ghcr.io/interlisp/online-medley :production-1
238+ docker tag ${image} :production ${image} :production-1
239239 fi
240240 #
241- docker tag ghcr.io/interlisp/online-medley :development ghcr.io/interlisp/online-medley :production
241+ docker tag ${image} :development ${image} :production
242242 echo " Online-medley moved from development to production."
243243 ;;
244244
245245 IrestoreI)
246- if [ -z " $( docker images -q ghcr.io/interlisp/online-medley :production-1) " ]
246+ if [ -z " $( docker images -q ${image} :production-1) " ]
247247 then
248- echo " ERROR: docker image \" ghcr.io/interlisp/online-medley :production-1\" does not exist."
248+ echo " ERROR: docker image \" ${image} :production-1\" does not exist."
249249 echo " Cannot restore previous production version"
250250 exit 1
251251 fi
252- docker tag ghcr.io/interlisp/online-medley :production-1 ghcr.io/interlisp/online-medley :production
253- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production-2) " ]
252+ docker tag ${image} :production-1 ${image} :production
253+ if [ -n " $( docker images -q ${image} :production-2) " ]
254254 then
255- docker tag ghcr.io/interlisp/online-medley :production-2 ghcr.io/interlisp/online-medley :production-1
255+ docker tag ${image} :production-2 ${image} :production-1
256256 fi
257- if [ -n " $( docker images -q ghcr.io/interlisp/online-medley :production-3) " ]
257+ if [ -n " $( docker images -q ${image} :production-3) " ]
258258 then
259- docker tag ghcr.io/interlisp/online-medley :production-3 ghcr.io/interlisp/online-medley :production-2
260- docker image rm ghcr.io/interlisp/online-medley :production-3
259+ docker tag ${image} :production-3 ${image} :production-2
260+ docker image rm ${image} :production-3
261261 fi
262262 echo " Previous Online-medley production version restored."
263263 ;;
@@ -270,6 +270,9 @@ case $1 in
270270 ;;
271271
272272 esac
273+
274+ image=
275+
273276 ;;
274277
275278 # install docker image for new portal releases - dev and production
0 commit comments