-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #57 from mnhkahn/refactor_dao
Refactor dao
- Loading branch information
Showing
10 changed files
with
589,203 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BINARY=maodou | ||
TEST_PACKAGES=github.com/mnhkahn/maodou/dao |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
include .env | ||
|
||
d := $(shell date) | ||
branch := $(shell git branch | grep \* | cut -d ' ' -f2) | ||
|
||
.PHONY: help | ||
all: help | ||
help: Makefile | ||
@echo | ||
@echo " Choose a command run in ${BINARY}:" | ||
@echo | ||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /' | ||
@echo | ||
|
||
## pull: Revert & pull code from remote by current branch. | ||
pull: | ||
git reset --hard | ||
git pull origin ${branch} | ||
|
||
## push: Auto commit & push code to remote by current branch. | ||
push: version | ||
git commit -am "chore: date is $d." | ||
git push origin ${branch} | ||
|
||
## cover: Run all test code & print cover profile. | ||
cover: | ||
go test -coverprofile=/tmp/${BINARY}-makecover.out ${TEST_PACKAGES} && go tool cover -html=/tmp/${BINARY}-makecover.out | ||
|
||
## version: Show current code version. | ||
version: | ||
@git remote -v | ||
@echo branch: $(branch) | ||
|
||
## chglog: Run git-chglog & save to CHANGELOG | ||
chglog: | ||
@git-chglog -o CHANGELOG.md | ||
git commit -am "add chglog: date is $d." | ||
git push origin ${branch} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.