여기에는 오류가 있는 것 같습니다. v3.6.0.beta2 태그를 통해 가져오기를 시도했는데, 다음과 같은 오류가 발생했습니다:
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && sudo -H -E -u discourse bash -c '
set -o errexit
git fetch --tags --prune-tags --prune --force origin
if [[ $(git symbolic-ref --short HEAD) == v3.6.0.beta2 ]] ; then
git pull
else
git -c advice.detachedHead=false checkout v3.6.0.beta2
fi
' failed with return #<Process::Status: pid 146 exit 128>
Location of failure: /usr/local/lib/ruby/gems/3.4.0/gems/pups-1.4.0/lib/pups/exec_command.rb:138:in 'Pups::ExecCommand#spawn'
exec failed with the params {"cd" => "$home", "hook" => "code", "cmd" => ["sudo -H -E -u discourse git clean -f", "sudo -H -E -u discourse bash -c '\n set -o errexit\n git fetch --tags --prune-tags --prune --force origin\n if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then\n git pull\n else\n git -c advice.detachedHead=false checkout $version\n fi\n'", "sudo -H -E -u discourse git config user.discourse-version $version", "mkdir -p tmp", "chown discourse:www-data tmp", "mkdir -p tmp/pids", "mkdir -p tmp/sockets", "touch tmp/.gitkeep", "mkdir -p /shared/log/rails", "bash -c \"touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log\"", "bash -c \"ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr,sidekiq}.log $home/log\"", "bash -c \"mkdir -p /shared/{uploads,backups}\"", "bash -c \"ln -s /shared/{uploads,backups} $home/public\"", "bash -c \"mkdir -p /shared/tmp/{backups,restores}\"", "bash -c \"ln -s /shared/tmp/{backups,restores} $home/tmp\"", "chown -R discourse:www-data /shared/log/rails /shared/uploads /shared/backups /shared/tmp", "[ ! -d public/plugins ] || find public/plugins/ -maxdepth 1 -xtype l -delete"]}
bootstrap failed with exit code 128
** FAILED TO BOOTSTRAP ** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
adc8ef45e9ae880827c9294dbbf73dfe9ab413a050c83fe3f4722c2911876ce2
version은(는) 브랜치만 지원하며, 태그는 지원하지 않습니다!
올바른 사용법은 다음과 같습니다:
params:
version: release/2025.11
근본 원인은 git symbolic-ref --short HEAD 명령어가 브랜치 이름만 반환할 수 있기 때문입니다. 태그나 해시를 지원하려면 아래 명령어로 변경해야 합니다.
git describe --exact-match --tags 2>/dev/null || git rev-parse --short HEAD
하지만 이렇게 변경하는 것은 권장하지 않습니다. 과도한 커스텀은 잠재적인 기술 부채를 초래할 수 있기 때문입니다. 공식적인 수정이 이루어지지 않는 한 유지하는 것이 좋습니다.
왜 release/2025.11을(를) 가져오려고 했느냐 하면, 현재 프로덕션 환경이 이 버전과 매우 유사하기 때문입니다. 업그레이드를 시도하려 했지만 문제가 발생할까 봐 우려스러웠습니다. 또한, 승인 프로세스상 프로덕션 환경에서 직접 업그레이드를 수행할 수 없으며, 반드시 테스트 환경에서 업그레이드 과정(release/2025.11 => release/2026.1)을 검증하여 문제가 없음을 확인한 후에야 프로덕션 환경에서 작업을 수행할 수 있습니다. 다소 번거롭지만, 프로세스상 올바른 최선의 선택입니다. 그래서 저는 특정 브랜치나 태그를 가져오는 방법을 여기서 찾아야 했습니다.
이렇게 길게 설명드린 점 죄송합니다. 다행히도, 현재로서는 허용할 만한 해결책을 찾았습니다. 감사합니다.


