-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub-repo-update.sh
More file actions
executable file
·94 lines (84 loc) · 2.56 KB
/
github-repo-update.sh
File metadata and controls
executable file
·94 lines (84 loc) · 2.56 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
#!/bin/bash
# GitHub Repository Automation Script
# This script updates repository description and topics
echo "🚀 GitHub Repository Update Script"
echo "================================="
# Check if gh is authenticated
if ! gh auth status &> /dev/null; then
echo "❌ Not authenticated. Please run: gh auth login --web"
exit 1
fi
# Function to update repository
update_repo() {
echo "📝 Updating repository description and topics..."
gh repo edit \
--description "⏱️ Bold iOS stopwatch app with lap tracking, Bungee font, random vibrant backgrounds, and motivational quotes. Built with SwiftUI." \
--add-topic "ios" \
--add-topic "swift" \
--add-topic "swiftui" \
--add-topic "stopwatch" \
--add-topic "timer" \
--add-topic "ios-app" \
--add-topic "lap-timer" \
--add-topic "bungee-font" \
--add-topic "motivational-quotes" \
--add-topic "xcode" \
--add-topic "swift5" \
--add-topic "ios17" \
--add-topic "custom-fonts" \
--add-topic "animation" \
--add-topic "haptic-feedback"
if [ $? -eq 0 ]; then
echo "✅ Repository updated successfully!"
echo ""
echo "📊 Current repository info:"
gh repo view --json name,description,topics,url | jq '.'
else
echo "❌ Failed to update repository."
exit 1
fi
}
# Function to create release
create_release() {
local version=$1
local notes=$2
echo "📦 Creating release v$version..."
gh release create "v$version" \
--title "Release v$version" \
--notes "$notes" \
--generate-notes
}
# Function to sync with remote
sync_repo() {
echo "🔄 Syncing with remote..."
git pull origin main
git push origin main
}
# Main menu
case "${1:-update}" in
update)
update_repo
;;
release)
if [ -z "$2" ]; then
echo "Usage: $0 release <version> [notes]"
exit 1
fi
create_release "$2" "${3:-Auto-generated release notes}"
;;
sync)
sync_repo
;;
info)
echo "📊 Repository information:"
gh repo view --json name,description,topics,url,defaultBranchRef,visibility | jq '.'
;;
*)
echo "Usage: $0 {update|release|sync|info}"
echo " update - Update repo description and topics"
echo " release - Create a new release"
echo " sync - Sync with remote repository"
echo " info - Show repository information"
exit 1
;;
esac