Skip to content

Commit

Permalink
make: replicate ci workflow into a makefile
Browse files Browse the repository at this point in the history
This is to help local development.

As of now, default behaviour is to git push to origin -- as default
remote -- from current branch.
  • Loading branch information
bjgavilanes committed Oct 13, 2024
1 parent ff22a5b commit 38736c9
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 38736c9

Please sign in to comment.