# SPDX-FileCopyrightText: 2022 Oxhead Alpha
# SPDX-License-Identifier: LicenseRef-MIT-OA

.PHONY: all build install install-debugger

VSCODE ?= code
VERSION ?= $(shell bash -c "sed '8q;d' ../package.yaml | tail -c 6";)

all: install

build: install-debugger
	yarn
	yarn compile

install: build
	yarn package
	$(VSCODE) --install-extension michelson-debugger-$(VERSION).vsix

install-debugger:
	stack install --fast --local-bin-path bin morley-debugger
