Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.1.8
  5. checkDev:
  6. git checkout dev
  7. build:
  8. yarn build
  9. commit:
  10. git add . && \
  11. git commit --no-verify -m "fix: change evaluate"
  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 checkout dev
  33. # 计算总时间
  34. total_time:
  35. powershell -NoProfile -Command "Write-Host 'Total time taken: $((Get-Date -UFormat %%s) - $(START_TIME)) seconds'"
  36. all: checkDev commit push merge build tag docker-build docker-push total_time
  37. proToMaster: checkPre merge build commit push tag docker-build docker-push total_time
  38. pushDev: checkDev commit push
  39. pushPre: checkPre mergePre push checkDev