Skip to content

Commit

Permalink
feat: add makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-verdes committed Oct 23, 2024
1 parent b4a3b32 commit 3cea8d3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Makefile

MAKEFLAGS += -j2
-include .env
export

CURRENT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
CURRENT_PATH := $(shell pwd)
DEFAULT_BRANCH := $(shell git remote show upstream | sed -n '/HEAD branch/s/.*: //p')
AMM := ${HOME}/amm

.PHONY: gitRebase
gitRebase:
git checkout $(DEFAULT_BRANCH) && \
git pull upstream $(DEFAULT_BRANCH) && \
git push origin $(DEFAULT_BRANCH) && \
git checkout $(CURRENT_BRANCH) && \
git rebase $(DEFAULT_BRANCH)
git push --force origin $(CURRENT_BRANCH)

.PHONY: gitAmmend
gitAmmend:
git add . && git commit --amend --no-edit && git push --force origin $(CURRENT_BRANCH)

.PHONY: run
run:
npm start

.PHONY: build
build:
npm run build

0 comments on commit 3cea8d3

Please sign in to comment.