에러해결하기-Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.

Lee Yongin·2023년 11월 30일
0

리액트 네이티브

목록 보기
4/6
post-thumbnail

배포 준비중인 서비스는 x.y.z-a(semantic-hotfix)형태로 버전관리를 할 예정이다.

  1. semantic version: 각 android의 gradle또는 ios의 Info.plist 파일에서 따온다.
  2. hotfix version: react native 프로젝트의 package.json파일에서 별도로 관리해서 semantic version 뒤에 붙여준다.

에러

1.0.0-1에서 1.0.0-2로 바꾸려 하는데 appcenter로 올라가지 않았다.
ios는 되는데 android는 안되는 기현상이 있었다.
이미 1.0.0이라고 gradle파일에 존재했기 때문에 android 폴더 바깥의 hotfix버전이 바뀐 것과는 별개로 identical(동일)한 것이라고 인식했기 때문이었다.

Error: The uploaded package was not released because it is identical to the contents of the specified deployment's current release.

이런 오류가 나는데...스택 오버플로우와 깃헙 이슈를 바탕으로 하나씩 다 시도해보았다.

appcenter 로그인/로그아웃

되는 사람도 있다는데 난 안 된다....

$ appcenter logout
$ appcenter login

명령어에 속성 추가

appcenter codepush release-react 명령어로 앱을 코드푸시할 때 끝에 '--disable-duplicate-release-error'를 붙여주었더니 해결되었다.

appcenter codepush release-react  --app #{ENV['OWNER_NAME']}/#{ENV['APP_NAME']} --deployment-name Staging --development true --description 'version #{version_number}-#{hotfix_number} Staging codepush test' --mandatory true --disable-duplicate-release-error

예시

desc "Codepush to android staging track "
  lane :codepush_to_staging do |options|
    update_android_version(options)
		#codepush_staging으로 디버깅을 끝내고 실행하는 걸 전제로 두기때문에 hotifix version 업데이트 하지 않음
    version_number = read_android_version()
    increment_hotfix_number(ENV['ANDROID_HOTFIX_VERSION'])
    hotfix_number = read_and_parse_json('../../package.json')[ENV['ANDROID_HOTFIX_VERSION']].to_i
    Dir.chdir('../../') do
      sh "appcenter codepush release-react  --app #{ENV['OWNER_NAME']}/#{ENV['APP_NAME']} --deployment-name Staging --development true --description 'version #{version_number}-#{hotfix_number} Staging codepush test' --mandatory true --disable-duplicate-release-error"
    end
    slack(
      message: "Android Gabojait 테스  버전 #{version_number}-#{hotfix_number} - Codepush Staging 업로드 완료",
      slack_url: ENV['SLACK_URL']
    )
  end
profile
f1을 좋아하는...🏆 f1처럼 빠르고 정확한 걸 좋아하는 안드로이드 개발자

0개의 댓글