-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpush-github.sh
More file actions
executable file
·46 lines (38 loc) · 1.46 KB
/
Copy pathpush-github.sh
File metadata and controls
executable file
·46 lines (38 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env bash
# push-github.sh — Crée le repo SuperDictee et pousse les fichiers
set -euo pipefail
GITHUB_TOKEN="ghp_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"
GITHUB_USER="batoucode"
REPO_NAME="SuperDictee"
echo "=== SuperDictée → GitHub ==="
# 1. Créer le repo
echo "[1/4] Création du repo…"
RESPONSE=$(curl -s -X POST \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.v3+json" \
https://api.github.com/user/repos \
-d "{\"name\":\"$REPO_NAME\",\"private\":false,\"auto_init\":false,\"description\":\"Dictée vocale IA locale — faster-whisper + Ollama + GTK3 — Fedora 44 / GNOME 50 / Wayland\"}")
if echo "$RESPONSE" | grep -q '"full_name"'; then
echo " ✓ Repo créé."
elif echo "$RESPONSE" | grep -q "already exists"; then
echo " ℹ Repo déjà existant."
else
echo " ✗ Erreur : $RESPONSE"
exit 1
fi
# 2. Init git
echo "[2/4] Init git local…"
cd "$(dirname "${BASH_SOURCE[0]}")"
git init
git remote remove origin 2>/dev/null || true
git remote add origin "https://$GITHUB_USER:$GITHUB_TOKEN@github.com/$GITHUB_USER/$REPO_NAME.git"
# 3. Commit
echo "[3/4] Commit…"
git add superdictee.py README.md
git commit -m "feat: SuperDictée v3 — double Ctrl, tray GTK3, overlay coloré, confirmation avant collage"
# 4. Push
echo "[4/4] Push…"
git branch -M main
git push -u origin main --force
echo ""
echo "✓ https://github.com/$GITHUB_USER/$REPO_NAME"