-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupload_to_github.sh
More file actions
50 lines (40 loc) Β· 1.58 KB
/
Copy pathupload_to_github.sh
File metadata and controls
50 lines (40 loc) Β· 1.58 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
#!/bin/bash
# Upload bundle_pos app to GitHub
# This script will create a GitHub repository and push the code
set -e
echo "π Starting GitHub upload process for bundle_pos app..."
# Check if we're in the right directory
if [ ! -f "setup.py" ] || [ ! -f "README.md" ]; then
echo "β Error: Not in the bundle_pos app directory"
echo "Please run this script from the bundle_pos app directory"
exit 1
fi
# Check git status
echo "π Checking git status..."
git status
# Check if remote already exists
if git remote | grep -q "origin"; then
echo "π‘ Remote 'origin' already exists. Removing it..."
git remote remove origin
fi
# Create GitHub repository using GitHub CLI (if available)
echo "ποΈ Creating GitHub repository..."
if command -v gh &> /dev/null; then
echo "Using GitHub CLI to create repository..."
gh repo create bundle_pos --public --description "Dynamic Bundle Point of Sale System for ERPNext" --source=. --remote=origin --push
else
echo "GitHub CLI not found. Adding remote manually..."
# Add remote (assuming the repo exists on GitHub)
git remote add origin https://github.com/poparab/bundle_pos.git
# Set main branch
git branch -M main
# Push to GitHub
echo "π€ Pushing to GitHub..."
git push -u origin main
fi
echo "β
Successfully uploaded bundle_pos app to GitHub!"
echo "π Repository URL: https://github.com/poparab/bundle_pos"
echo ""
echo "Next steps:"
echo "1. Visit the repository on GitHub to verify the upload"
echo "2. Install the app on your site with: bench --site [site-name] install-app bundle_pos"