rig/rig-postgres/Makefile

37 lines
771 B
Makefile

# 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: gitAmend
gitAmend:
git add . && git commit --amend --no-edit && git push --force origin $(CURRENT_BRANCH)
.PHONY: test
test:
cargo watch -qcx 'test'
.PHONY: fix
fix:
cargo clippy --fix
.PHONY: run
run:
cargo run --example vector_search_postgres