From 38736c957ae3c6cd3794f11a1a96e62b659d16b1 Mon Sep 17 00:00:00 2001 From: Brayen Gavilanes Date: Sun, 13 Oct 2024 12:15:53 +0000 Subject: [PATCH] make: replicate ci workflow into a makefile This is to help local development. As of now, default behaviour is to git push to origin -- as default remote -- from current branch. --- Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..54f8c6a --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +CURRENT_GIT_BRANCH=$(shell git branch --show-current) +DEFAULT_GIT_REMOTE=origin + +default: push + +install: package.json pnpm-lock.yaml + pnpm install --frozen-lockfile + +check: install + pnpm run check + +lint: check + pnpm run lint || pnpm run format + +build: lint + pnpm run build + +clean: + find build -type f -exec rm {} \+; + +build_clean: clean build + +push: lint + git push ${DEFAULT_GIT_REMOTE} ${CURRENT_GIT_BRANCH}