Makefile 809 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. BINARY = mynotes.bin
  2. BUILD_DIR = ./bin/
  3. CFG_FILE = mynotes_cfg.json
  4. .DEFAULT_GOAL := help
  5. build:
  6. @CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BUILD_DIR)/$(BINARY) .
  7. run: build
  8. @cd $(BUILD_DIR) && ./$(BINARY) --run $(CFG_FILE)
  9. commit:
  10. @read -p "Enter commit message:" msg; \
  11. git add . && git status && sleep 1 && git commit -m "$$msg"
  12. sync: pull push
  13. push:
  14. @git push origin master
  15. pull:
  16. @git pull --rebase origin master
  17. all: commit sync
  18. help:
  19. @clear
  20. @echo "Comenzi disponibile: "
  21. @echo " build - construieste executabilul"
  22. @echo " run - executa programul"
  23. @echo " pull - ia ultimele modificare din repository"
  24. @echo " commit - adauga in repository modificarile"
  25. @echo " push - pune toate modificarile in repository"
  26. @echo " all - commit pull push"