Revert "ned soll endlich pushen"

This reverts commit 8ca30ae5f3.
This commit is contained in:
2025-12-09 15:16:45 +01:00
parent 8ca30ae5f3
commit 97e7f88906
2 changed files with 11 additions and 21 deletions

View File

@ -9,16 +9,16 @@ steps:
- export PATH="$HOME/.fly/bin:$PATH" - export PATH="$HOME/.fly/bin:$PATH"
- flyctl deploy --config fly.toml --app gallus-pub --remote-only - flyctl deploy --config fly.toml --app gallus-pub --remote-only
#build_and_deploy_backend: build_and_deploy_backend:
# image: node:20 image: node:20
# environment: environment:
# FLY_API_TOKEN: FLY_API_TOKEN:
# from_secret: FLY_API_TOKEN from_secret: FLY_API_TOKEN
# commands: commands:
# - cd backend - cd backend
# - curl -L https://fly.io/install.sh | sh - curl -L https://fly.io/install.sh | sh
# - export PATH="$HOME/.fly/bin:$PATH" - export PATH="$HOME/.fly/bin:$PATH"
# - flyctl deploy --config fly.toml --app gallus-cms-backend --remote-only - flyctl deploy --config fly.toml --app gallus-cms-backend --remote-only
when: when:
branch: branch:

View File

@ -13,9 +13,7 @@ export class GitService {
this.workspaceDir = env.GIT_WORKSPACE_DIR; this.workspaceDir = env.GIT_WORKSPACE_DIR;
this.repoUrl = env.GIT_REPO_URL; this.repoUrl = env.GIT_REPO_URL;
this.token = env.GIT_TOKEN; this.token = env.GIT_TOKEN;
// Ensure the git binary is explicitly set in production containers this.git = simpleGit();
const gitBinary = process.env.GIT_BINARY || (env.NODE_ENV === 'production' ? '/usr/bin/git' : 'git');
this.git = simpleGit({ binary: gitBinary });
} }
async initialize() { async initialize() {
@ -29,14 +27,6 @@ export class GitService {
); );
try { try {
// Log git version to aid diagnosing ENOENT issues in runtime
try {
const version = await this.git.raw(['--version']);
console.log(`git available: ${version.trim()}`);
} catch (e: any) {
console.warn('git not available or failed to execute --version:', e?.message || e);
}
// Check if repo already exists // Check if repo already exists
await this.git.cwd(this.workspaceDir); await this.git.cwd(this.workspaceDir);
await this.git.status(); await this.git.status();