12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- .PHONY: build commit push merge tag docker-build docker-push all checkDev pushDev
- # 记录开始时间
- START_TIME := $(shell powershell -NoProfile -Command "Get-Date -UFormat %%s")
- checkDev:
- git checkout dev
- build:
- yarn build
- commit:
- git add . && \
- git commit -m "fix: change package"
- checkPre:
- git checkout pre
- mergePre:
- git checkout master && \
- git merge pre && \
- git push
- push:
- git push
- merge:
- git checkout master && \
- git merge dev && \
- git push
- tag:
- git checkout master && \
- git tag v1.3.3 && \
- git push origin --tags
- docker-build:
- docker build -f ./Dockerfile -t registry.yingcaibx.com/tl/admin_web:v1.3.3 .
- docker-push:
- docker push registry.yingcaibx.com/tl/admin_web:v1.3.3 && \
- git checkout dev
- # 计算总时间
- total_time:
- powershell -NoProfile -Command "Write-Host 'Total time taken: $((Get-Date -UFormat %%s) - $(START_TIME)) seconds'"
- all: checkDev build commit push merge tag docker-build docker-push total_time
- pushDev: checkDev commit push
- pushPre: checkPre mergePre push checkDev
|