forked from theantipopau/omencore
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload-to-github.sh
More file actions
102 lines (91 loc) · 2.59 KB
/
upload-to-github.sh
File metadata and controls
102 lines (91 loc) · 2.59 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#!/bin/bash
# OmenCore GitHub Upload Script
# This script initializes the git repo and pushes to GitHub
echo "========================================="
echo " OmenCore GitHub Upload Script"
echo "========================================="
echo ""
# Check if git is initialized
if [ ! -d ".git" ]; then
echo "Initializing Git repository..."
git init
echo "✓ Git initialized"
else
echo "✓ Git repository already initialized"
fi
# Add .gitignore
if [ ! -f ".gitignore" ]; then
echo "Error: .gitignore not found!"
exit 1
fi
# Stage all files
echo ""
echo "Staging files..."
git add .
echo "✓ Files staged"
# Check if there are changes to commit
if git diff --staged --quiet; then
echo "⚠ No changes to commit"
else
# Commit
echo ""
echo "Committing changes..."
git commit -m "Initial OmenCore commit - v1.0.0
Features:
- Fan & thermal control with custom curves
- CPU undervolting support
- RGB lighting profiles
- Hardware monitoring
- Corsair/Logitech device integration
- Auto-update via GitHub releases
- HP Omen system detection
- System optimization tools"
echo "✓ Changes committed"
fi
# Check if remote exists
if git remote get-url origin &> /dev/null; then
echo "✓ Remote 'origin' already configured"
else
echo ""
echo "Adding remote repository..."
git remote add origin https://github.com/theantipopau/omencore.git
echo "✓ Remote added"
fi
# Set main branch
echo ""
echo "Setting main branch..."
git branch -M main
echo "✓ Branch set to main"
# Push to GitHub
echo ""
echo "Pushing to GitHub..."
echo "You may be prompted for your GitHub credentials..."
git push -u origin main
if [ $? -eq 0 ]; then
echo ""
echo "========================================="
echo " ✓ Successfully uploaded to GitHub!"
echo "========================================="
echo ""
echo "Repository: https://github.com/theantipopau/omencore"
echo ""
echo "Next steps:"
echo "1. Create first release: git tag v1.0.0 && git push origin v1.0.0"
echo "2. GitHub Actions will automatically build and publish"
echo "3. Users can then auto-update from within the app"
echo ""
else
echo ""
echo "========================================="
echo " ✗ Push failed"
echo "========================================="
echo ""
echo "Possible issues:"
echo "- GitHub credentials not configured"
echo "- Repository doesn't exist (create it at github.com/theantipopau/omencore)"
echo "- Network connectivity problems"
echo ""
echo "Try manually:"
echo " git push -u origin main"
exit 1
fi