Skip to content

Commit 8ae1929

Browse files
committed
Refine Makefile for installation
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.
1 parent 75d884b commit 8ae1929

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ extension: ## Build service image to be deployed as a desktop extension
1818
.PHONY: extension
1919

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

2426
dev-extension: install-extension
@@ -27,7 +29,7 @@ dev-extension: install-extension
2729
.PHONY: dev-extension
2830

2931
remove-extension:
30-
@docker extension remove $(LOCAL_IMAGE_NAME)
32+
@docker extension rm $(LOCAL_IMAGE_NAME)
3133
.PHONY: remove-extension
3234

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

0 commit comments

Comments
 (0)