실제 환경 배포 결함 수정 2: artifact 모드 정규화, 실행 계정 모드 artifact 읽기 권한·current 경로, 같은 버전 재설치 보존, Webmaker 백업 관대 처리, 부트스트랩 릴리스 기록 행 생성
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
7f307602a3
commit
3641a703db
+2
-1
@@ -29,7 +29,8 @@ if (cmd === 'build') {
|
||||
const artifacts = {};
|
||||
for (const [m, paths] of Object.entries(MODULES)) {
|
||||
const file = `${m}-${VERSION}.tar.gz`; const abs = join(out, file); const present = paths.filter((p) => existsSync(join(ROOT, p)));
|
||||
const tarArgs = ['-czf', abs, '-C', ROOT, '--exclude=.git', '--exclude=node_modules', '--exclude=*/data', '--exclude=*/data/*', '--exclude=modules/*/data', '--exclude=dist', '--exclude=*.sqlite', '--exclude=*.log', '--exclude=*.tmp'];
|
||||
// 디렉터리·파일 모드 정규화(실제 환경 결함 수정): 개발 PC 의 umask(077)가 artifact 에 0700 으로 들어가면 서버에서 다른 실행 계정(arihakdang 등)이 코드를 읽지 못한다.
|
||||
const tarArgs = ['-czf', abs, '-C', ROOT, '--mode=u=rwX,go=rX', '--owner=0', '--group=0', '--numeric-owner', '--exclude=.git', '--exclude=node_modules', '--exclude=*/data', '--exclude=*/data/*', '--exclude=modules/*/data', '--exclude=dist', '--exclude=*.sqlite', '--exclude=*.log', '--exclude=*.tmp'];
|
||||
if (m === 'webmaker' || m === 'arimail') { tarArgs.push('--transform', `s,^modules/${m},.,`); } tarArgs.push(...present);
|
||||
execFileSync('tar', tarArgs); artifacts[m] = { file, sha256: sha(abs), size: statSync(abs).size, paths: present };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user