-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreate-github-repos.sh
More file actions
executable file
Β·58 lines (49 loc) Β· 2.03 KB
/
create-github-repos.sh
File metadata and controls
executable file
Β·58 lines (49 loc) Β· 2.03 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
#!/bin/bash
echo "π Creating GitHub repositories for Sales Report App..."
echo "=================================================="
# Check if gh CLI is installed
if ! command -v gh &> /dev/null; then
echo "β GitHub CLI (gh) is not installed."
echo "Please install it first: https://cli.github.com/"
echo "Or create the repositories manually on GitHub.com"
exit 1
fi
# Check if user is authenticated
if ! gh auth status &> /dev/null; then
echo "β Not authenticated with GitHub CLI."
echo "Please run: gh auth login"
exit 1
fi
echo "β
GitHub CLI is available and authenticated."
# Create client repository
echo ""
echo "π± Creating client repository..."
cd client
gh repo create sales-report-client --public --description "Frontend for Sales Report App - React/TypeScript application for sales agents" --source=. --remote=origin --push
if [ $? -eq 0 ]; then
echo "β
Client repository created successfully!"
echo "π Repository URL: https://github.com/$(gh api user --jq .login)/sales-report-client"
else
echo "β Failed to create client repository"
fi
# Create server repository
echo ""
echo "π₯οΈ Creating server repository..."
cd ../server
gh repo create sales-report-server --public --description "Backend for Sales Report App - Node.js/Express API server" --source=. --remote=origin --push
if [ $? -eq 0 ]; then
echo "β
Server repository created successfully!"
echo "π Repository URL: https://github.com/$(gh api user --jq .login)/sales-report-server"
else
echo "β Failed to create server repository"
fi
echo ""
echo "π Repository creation complete!"
echo "=================================================="
echo "π± Client: https://github.com/$(gh api user --jq .login)/sales-report-client"
echo "π₯οΈ Server: https://github.com/$(gh api user --jq .login)/sales-report-server"
echo ""
echo "π Next steps:"
echo "1. Clone each repository to separate directories"
echo "2. Set up environment variables in each project"
echo "3. Install dependencies and run the applications"