-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpublish_template.sh
More file actions
executable file
·74 lines (61 loc) · 1.87 KB
/
publish_template.sh
File metadata and controls
executable file
·74 lines (61 loc) · 1.87 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
#!/bin/bash
# 🦀 Remolab Rust Template Publisher
# This script helps publish the template to GitHub
set -e
echo "🦀 Publishing Remolab Rust Template..."
echo ""
# Check if we're in a git repository
if [ ! -d ".git" ]; then
echo "❌ Not in a git repository. Initializing..."
git init
fi
# Add all files
echo "📦 Adding all template files..."
git add .
# Commit changes
echo "💾 Committing template..."
git commit -m "🦀 Remolab Rust Template - Ready for use
Features:
✅ Full async runtime (tokio)
✅ CLI framework (clap)
✅ Error handling (anyhow)
✅ Serialization (serde)
✅ AI/LLM ready (rig-core)
✅ Schema generation (schemars)
✅ Structured logging (tracing)
✅ Docker support
✅ CI/CD pipeline
✅ Development automation (just)
✅ GitHub repo creation
Template created by Remolab 🚀"
# Check if GitHub CLI is available
if ! command -v gh &> /dev/null; then
echo "❌ GitHub CLI not found. Please install it:"
echo " brew install gh"
echo " gh auth login"
exit 1
fi
# Check if authenticated
if ! gh auth status &> /dev/null; then
echo "❌ Not authenticated with GitHub. Please run:"
echo " gh auth login"
exit 1
fi
# Get repository name
REPO_NAME=$(basename "$PWD")
echo "📡 Creating GitHub repository: $REPO_NAME"
# Create repository and push
gh repo create "$REPO_NAME" \
--public \
--description "🦀 Ultimate Rust project template with async runtime, AI/LLM support, Docker, CI/CD, and automation. Created by Remolab." \
--source=. \
--remote=origin \
--push
echo ""
echo "✅ Template published successfully!"
echo "🌐 Repository: https://github.com/$(gh api user --jq .login)/$REPO_NAME"
echo ""
echo "📋 Users can now create projects with:"
echo " cargo generate --git https://github.com/$(gh api user --jq .login)/$REPO_NAME.git --name my-project"
echo ""
echo "🎉 Happy coding with Remolab!"