soiz1 commited on
Commit
4dfa268
·
verified ·
1 Parent(s): e0675e2

Update ftp-upload.js

Browse files
Files changed (1) hide show
  1. ftp-upload.js +6 -5
ftp-upload.js CHANGED
@@ -12,11 +12,12 @@ const remoteUrl = `https://user:${token}@huggingface.co/spaces/soiz1/simple-edit
12
  console.log("接続完了!...");
13
  try {
14
  console.log("Git リポジトリを初期化...");
15
- execSync("git init", { cwd: repoPath });
16
- execSync(`git remote add origin ${remoteUrl}`, { cwd: repoPath });
17
- execSync("git add .", { cwd: repoPath });
18
- execSync('git commit -m "Automated deploy"', { cwd: repoPath });
19
- execSync("git push -f origin master", { cwd: repoPath }); // -f で強制上書き
 
20
  console.log("✅ アップロードが完了しました!");
21
  } catch (err) {
22
  console.error("❌ アップロードに失敗しました:", err.message);
 
12
  console.log("接続完了!...");
13
  try {
14
  console.log("Git リポジトリを初期化...");
15
+ execSync("git init", { cwd: repoPath, shell: true });
16
+ execSync(`git remote add origin ${remoteUrl}`, { cwd: repoPath, shell: true });
17
+ execSync("git add .", { cwd: repoPath, shell: true });
18
+ execSync('git commit -m "Automated deploy"', { cwd: repoPath, shell: true });
19
+ execSync("git push -f origin master", { cwd: repoPath, shell: true });
20
+
21
  console.log("✅ アップロードが完了しました!");
22
  } catch (err) {
23
  console.error("❌ アップロードに失敗しました:", err.message);