-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·59 lines (49 loc) · 1.48 KB
/
Copy pathrelease.sh
File metadata and controls
executable file
·59 lines (49 loc) · 1.48 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
#!/usr/bin/env bash
#
# Release script for swarm skill
# Packages the skill into a distributable .skill file
#
set -euo pipefail
# Colors
GREEN='\033[0;32m'
BLUE='\033[0;34m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
SKILL_DIR="$SCRIPT_DIR/swarm"
OUTPUT_FILE="$SCRIPT_DIR/swarm.skill"
echo -e "${BLUE}🚀 Packaging swarm skill...${NC}"
echo ""
# Check if skill directory exists
if [[ ! -d "$SKILL_DIR" ]]; then
echo -e "${YELLOW}❌ Error: Skill directory not found at $SKILL_DIR${NC}"
exit 1
fi
# Check if package script exists
PACKAGE_SCRIPT="$HOME/.claude/skills/skill-creator/scripts/package_skill.py"
if [[ ! -f "$PACKAGE_SCRIPT" ]]; then
echo -e "${YELLOW}❌ Error: Package script not found at $PACKAGE_SCRIPT${NC}"
echo " Make sure skill-creator is installed."
exit 1
fi
# Run the package script
echo -e "${BLUE}📦 Running packager...${NC}"
"$PACKAGE_SCRIPT" "$SKILL_DIR"
# Check if the skill file was created
if [[ ! -f "$OUTPUT_FILE" ]]; then
echo -e "${YELLOW}❌ Packaging failed${NC}"
exit 1
fi
# Get file size
SIZE=$(du -h "$OUTPUT_FILE" | cut -f1)
echo ""
echo -e "${GREEN}✅ Successfully packaged!${NC}"
echo ""
echo "📁 Output: $OUTPUT_FILE"
echo "📊 Size: $SIZE"
echo ""
echo "To share:"
echo " 1. Upload swarm.skill to GitHub releases"
echo " 2. Users install with: claude skills install swarm.skill"
echo " 3. Or users can unzip directly: unzip swarm.skill -d ~/.claude/skills/"
echo ""