Skip to content

Commit

Permalink
Refine Makefile for installation
Browse files Browse the repository at this point in the history
Previously, this Makefile could only update existing installations of
Docker extension installations. With this change, it will either install
or update depending on whether it's already installed.

I'm not sure if it was always broken of if it was something Docker
just changed, but either way — it's fixed now.
  • Loading branch information
rosszurowski committed May 30, 2022
1 parent 75d884b commit 8ae1929
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ extension: ## Build service image to be deployed as a desktop extension
.PHONY: extension

install-extension: extension ## Install extension image Docker desktop
docker extension update $(LOCAL_IMAGE_NAME)
@if $$(docker extension ls | grep -q $(LOCAL_IMAGE_NAME)); \
then docker extension update $(LOCAL_IMAGE_NAME); \
else docker extension install $(LOCAL_IMAGE_NAME); fi
.PHONY: install-extension

dev-extension: install-extension
Expand All @@ -27,7 +29,7 @@ dev-extension: install-extension
.PHONY: dev-extension

remove-extension:
@docker extension remove $(LOCAL_IMAGE_NAME)
@docker extension rm $(LOCAL_IMAGE_NAME)
.PHONY: remove-extension

push-extension: ## Build & Upload extension image to hub. Do not push if tag already exists: make push-extension tag=0.1
Expand Down

0 comments on commit 8ae1929

Please sign in to comment.