본문 바로가기
Android

안드로이드 스크립트로 build 하여 git push 하기

by xavi2019 2021. 12. 26.
./gradlew assembleLocalDebug
./gradlew assembleDevDebug
./gradlew assembleStageDebug
./gradlew assembleLiveDebug

filename1="/Users/zauin/AndroidStudioProjects/CaaS/app/build/outputs/apk/live/debug/caas-live-debug.apk"
cp $filename1 /Users/zauin/Project/Vercel/hausplanner-dist/hyapp

filename2="/Users/zauin/AndroidStudioProjects/CaaS/app/build/outputs/apk/dev/debug/caas-dev-debug.apk"
cp $filename2 /Users/zauin/Project/Vercel/hausplanner-dist/hyapp

filename3="/Users/zauin/AndroidStudioProjects/CaaS/app/build/outputs/apk/stage/debug/caas-stage-debug.apk"
cp $filename3 /Users/zauin/Project/Vercel/hausplanner-dist/hyapp

filename4="/Users/zauin/AndroidStudioProjects/CaaS/app/build/outputs/apk/local/debug/caas-local-debug.apk"
cp $filename4 /Users/zauin/Project/Vercel/hausplanner-dist/hyapp

cd /Users/zauin/Project/Vercel/hausplanner-dist/

git add *

git commit -m "apk 배포 $(date +%Y)-$(date +%m)-$(date +%d) $(date +%H):$(date +%M):$(date +%S)"

git push -u origin main

댓글