| … | … | @@ -184,18 +184,24 @@ async function _executeGitDeploy (server, repo, repoName, config, timestamp, opt |
| 184 | 184 | // Commit built result to release branch in the bare repo |
| 185 | 185 | let commitHash |
| 186 | 186 | try { |
| 187 | console.log(`[Deploy] Committing to release branch...`) |
| 188 | const commitStart = Date.now() |
| 187 | 189 | commitHash = await _commitToReleaseBranch(repo.path, checkoutDir, repoName, config, timestamp) |
| 188 | | console.log(`[Deploy] Committed to release branch: ${commitHash.slice(0, 8)}`) |
| 190 | const commitDuration = ((Date.now() - commitStart) / 1000).toFixed(1) |
| 191 | console.log(`[Deploy] Committed to release branch: ${commitHash.slice(0, 8)} (${commitDuration}s)`) |
| 189 | 192 | } catch (err) { |
| 190 | 193 | throw new Error(`Failed to commit release branch for ${repoName}: ${err.message}`) |
| 191 | 194 | } |
| 192 | 195 | |
| 193 | 196 | // Pre-build release archives (tar.gz + zip) |
| 194 | 197 | try { |
| 198 | console.log(`[Deploy] Building archives...`) |
| 199 | const archiveStart = Date.now() |
| 195 | 200 | const archiveDir = path.join(storagePath, 'archives') |
| 196 | 201 | await generateArchive(repo.path, repoName, archiveDir, 'tar.gz') |
| 197 | 202 | await generateArchive(repo.path, repoName, archiveDir, 'zip') |
| 198 | | console.log(`[Deploy] Archives built for ${repoName}`) |
| 203 | const archiveDuration = ((Date.now() - archiveStart) / 1000).toFixed(1) |
| 204 | console.log(`[Deploy] Archives built for ${repoName} (${archiveDuration}s)`) |
| 199 | 205 | } catch (err) { |
| 200 | 206 | // Non-fatal — archives can be lazy-generated on first HTTP request |
| 201 | 207 | console.error(`[Deploy] Archive generation failed for ${repoName}:`, err.message) |