Pokerogue 02. 커스텀 서버 추가설정

June 06, 2024    1 분 소요

0. 서론

몇 가지 추가하고 싶은 부분이 있음

  1. 포켓로그 업데이트 반영하기
  2. https 설정 -> 나중에

오늘은 업데이트 반영할 수 있는 환경 설정까지만..

포켓로그 업데이트 반영하기

pokerogue

우선 나는 clone한 후 업데이트를 했기 때문에, 이 수정한 repo를 private로 github에 올려야한다.

git remote rename origin upstream
git remote add origin https://github.com/vyzil/pokerogue-private.git
git push -u origin main


이제 pokerogue가 업데이트 되면 다음 명령어를 통해 내 repo에도 반영될 수 있도록 해야한다.

변경내용 참고
// /pokerogue/src/utils.ts
export const serverUrl = isLocal ? `${window.location.hostname}:${window.location.port}` : "";
export const apiUrl = isLocal ? serverUrl : "{주소}";

// /pokerogut/src/ui/menu-ui-handler.ts
// if문 제거, server에서도 import 가능하도록
// 1
manageDataOptions.push({
    label: i18next.t("menuUiHandler:importSession"),
    handler: () => {
        confirmSlot(i18next.t("menuUiHandler:importSlotSelect"), () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId));
        return true;
    },
    keepOpen: true
});

// 2
manageDataOptions.push({
    label: i18next.t("menuUiHandler:importSession"),
    handler: () => {
        confirmSlot(i18next.t("menuUiHandler:importSlotSelect"), () => true, slotId => this.scene.gameData.importData(GameDataType.SESSION, slotId));
        return true;
    },
    keepOpen: true
});

git fetch upstream
git merge upstream/main

# if conflict
code conflict.file
git add -A
git commit -m "conflist resolve conflict.file"

git push origin main


추가로, 이번에 업데이트 하면서 패키지가 하나 추가된 것 같다.
대충 아래처럼 처리해줬다.

npm install i18next-korean-postposition-processor
npm install

rogueserver

rogueserver도 비슷하게 처리한다.

git remote rename origin upstream
git remote add origin https://github.com/vyzil/rogueserver-private.git
git push -u origin master

Back-end는 사실상 거의 건드리는게 없으므로 conflict가 발생하지는 않을 듯

git fetch upstream
git merge upstream/master
git push origin master

pokerogue-app

pokerogue-app과 pokerogue-app-android도 아래처럼 버전관리를 따로 할 수 있다.
그런데, 굳이 이거까지 해야되나 싶음.
한번 하는 과정을 정리해보긴하는데, release를 머번 해줘야하기 때문에 굳이 update는 안하고 사용할 예정

git clone https://github.com/Admiral-Billy/Pokerogue-App.git
cd ./Pokrogue-App

git remote renamd origin upstream
git remote add origin https://github.com/vyzil/pokerogue-app-private.git
git push -u origin main

# modify url here

git add -A
git commit -m "server url modified"
git push

요약

앞으로 update시 수행할 작업

Pokerogue

screen -r pokerogue

# [ctrl + C] to stop Front-end Server

git fetch upstream
git merge upstream/main

# if conflict
code conflict.file
git add -A
git commit -m "conflist resolve conflict.file"

git push origin main

npm run start

# [ctlr+A] [D] to detach

Rogueserver

screen -r rogueserver

# [ctrl + C] to stop Back-end Server

git fetch upstream
git merge upstream/master
git push origin master

# /usr/local/go/bin/go build .
go build . 

./rogueserver --debug --dbuser {DB_USER} --dbpass {DB_PASS}

# [ctlr+A] [D] to detach

태그:

카테고리:

업데이트: