CodePush Standalone ์๋ฒ๋ฅผ ์ง์ ํฌํฌํ๊ณ Azure์ ๋ฐฐํฌํด์ ์์ฒด OTA ๋ฐฐํฌ ์์คํ ๋ง๋๋ ๋ฐฉ๋ฒ ์ ๋ฆฌ
CodePush ์๋ฒ ํฌํฌ
๋ก์ปฌ์ ํด๋ก
git clone https://github.com/your-username/code-push-server.git
Azure CLI ์ค์น
brew install azure-cli
๊ณต์ ๋ฌธ์ ์ฐธ๊ณ ํด์ Azure ๋ฆฌ์์ค ์์ฑ ์ ์ฐจ ๋ฐ๋ผ๊ฐ
Azure ๊ตฌ๋ ์ค์
az account set --subscription <subscription-id>
๋ฆฌ์์ค ๊ทธ๋ฃน ์์ฑ
az group create --name <resource-group-name> --location <az-location>
Bicep ํ ํ๋ฆฟ์ผ๋ก ๋ฆฌ์์ค ๋ฐฐํฌ
cd code-push-server/api
az deployment group create \
--resource-group <resource-group-name> \
--template-file ./codepush-infrastructure.bicep \
--parameters project_suffix=<project-suffix> az_location=<az-location>
์ฐธ๊ณ ๋ก project-suffix ๋ ํ๋ก์ ํธ ์ด๋ฆ์ ๋ถ์ด๋๋ก ํ์. codepush ๋ ์ด์งํผ ์์ ๋ช ๋ น์ด๋ก ๋ฆฌ์์ค ๋ง๋ค ๋ prefix ๋ก ๋ถ์.
๋ฐฐํฌ ๋์ค GitHub OAuth ๊ด๋ จ ์ ๋ ฅ ๋์ค๋๋ฐ, ์์ง ์๋น์ค ์ฃผ์๊ฐ ์์ผ๋๊น ๊ทธ๋ฅ ์ํฐ ์น๊ณ ๋์ด๊ฐ
Azure Portal ์ ์ โ ์น์ฑ โ ๋ฐฐํฌ > ๋ฐฐํฌ ์ผํฐ > ์ค์ ๋ค์ด๊ฐ์ Git ์ฐ๊ฒฐ ๋๊ณ ์ฒ์์ ํฌํฌํ ์ฝ๋ํธ์ ์๋ฒ ๋ ํฌ์งํ ๋ฆฌ๋ฅผ ์ฐ๊ฒฐ
์กฐ์ง ์ ํ ์ ๋จ๋ ๋ฌธ์ ํด๊ฒฐ

๋ฐฐํฌ ์คํจํ ์ ์์. ์์ธ์ package.json์ด api ํด๋ ์์ ์์ด์ ๋ฃจํธ ๊ธฐ์ค์ผ๋ก npm ์คํ๋ ๊ฒฝ์ฐ ๊นจ์ง
์๋์ฐ์ฉ ๋ช
๋ น์ด ๋ค์ด์๋ ์คํฌ๋ฆฝํธ๋ ์ผ๋ฐ ๋ฆฌ๋
์ค ํ๊ฒฝ์ ๋ง๊ฒ ๋ฐ๊ฟ์ผ ํจ



cd code-push-server/api
npm install
npm run build
npm start
8080 ํฌํธ ์ถฉ๋ํ๋ฉด Azure์์ ์ฑ ์ฌ์์ํ๊ฑฐ๋ ํฌํธ ๋ณ๊ฒฝํ๋ฉด ๋จ
npm install
npm run build
npm install -g .
code-push-standalone --version
code-push-server/api/README.md ์ฐธ๊ณ ํด์ GitHub OAuth Client ID/Secret ์์ฑํจ
๋ฑ๋ก ํ CLI์์ ์๋์ฒ๋ผ ์ฌ์ฉํจ
code-push-standalone register https://your-app.azurewebsites.net/
code-push-standalone login https://your-app.azurewebsites.net/
code-push-standalone release-react <App name> --dev
code-push-standalone deployment ls <App name>
#or
code-push-standalone release ls <App name>
code-push-standalone deployment history <App name> Staging --numReleases 50
code-push-standalone deployment ls <App name> -k
# ๊ฐ์ฅ ์ต์ ๋ฒ์ ๋นํ์ฑํ
code-push-standalone patch <App name> Staging --disabled true
#or
# ์์: Staging ๋ฐฐํฌ์์ v5 ๋ฆด๋ฆฌ์ฆ ๋นํ์ฑํ
code-push-standalone patch <App name> Staging v5 --disabled
# Production ๋ฐฐํฌ์์ ๋นํ์ฑํ
code-push-standalone patch <App name> Production v5 --disabled