Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. checkDev:
  5. git checkout dev
  6. build:
  7. yarn build
  8. commit:
  9. git add . && \
  10. git commit -m "fix: change package"
  11. checkPre:
  12. git checkout pre
  13. mergePre:
  14. git checkout master && \
  15. git merge pre && \
  16. git push
  17. push:
  18. git push
  19. merge:
  20. git checkout master && \
  21. git merge dev && \
  22. git push
  23. tag:
  24. git checkout master && \
  25. git tag v1.3.3 && \
  26. git push origin --tags
  27. docker-build:
  28. docker build -f ./Dockerfile -t registry.yingcaibx.com/tl/admin_web:v1.3.3 .
  29. docker-push:
  30. docker push registry.yingcaibx.com/tl/admin_web:v1.3.3 && \
  31. git checkout dev
  32. # 计算总时间
  33. total_time:
  34. powershell -NoProfile -Command "Write-Host 'Total time taken: $((Get-Date -UFormat %%s) - $(START_TIME)) seconds'"
  35. all: checkDev build commit push merge tag docker-build docker-push total_time
  36. pushDev: checkDev commit push
  37. pushPre: checkPre mergePre push checkDev