Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. .PHONY: build commit push merge tag docker-build docker-push all checkDev pushDev
  2. # 记录开始时间
  3. START_TIME := $(shell powershell -NoProfile -Command "Get-Date -UFormat %%s")
  4. V_TAG := v2.2.0
  5. checkDev:
  6. git checkout dev
  7. build:
  8. yarn build
  9. commit:
  10. git add . && \
  11. git commit --no-verify -m "fix: change maintenance"
  12. checkPre:
  13. git checkout pre
  14. mergePre:
  15. git checkout pre && \
  16. git merge dev && \
  17. git push
  18. push:
  19. git push
  20. merge:
  21. git checkout master && \
  22. git merge pre && \
  23. git push
  24. tag:
  25. git checkout master && \
  26. git tag $(V_TAG) && \
  27. git push origin --tags
  28. docker-build:
  29. docker build -f ./Dockerfile -t registry.yingcaibx.com/tl/admin_web:$(V_TAG) .
  30. docker-push:
  31. docker push registry.yingcaibx.com/tl/admin_web:$(V_TAG) && \
  32. git add . && \
  33. git commit --no-verify -m "fix: build" && \
  34. git push && \
  35. git checkout dev && \
  36. git merge master && \
  37. git push
  38. # 计算总时间
  39. total_time:
  40. powershell -NoProfile -Command "Write-Host 'Total time taken: $((Get-Date -UFormat %%s) - $(START_TIME)) seconds'"
  41. all: checkDev commit push merge build tag docker-build docker-push total_time
  42. proToMaster: checkPre merge build commit push tag docker-build docker-push total_time
  43. pushDev: checkDev commit push
  44. pushPre: checkPre mergePre push checkDev