-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_plugin.sh
More file actions
executable file
·101 lines (83 loc) · 2.69 KB
/
test_plugin.sh
File metadata and controls
executable file
·101 lines (83 loc) · 2.69 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
95
96
97
98
99
100
101
#!/bin/bash
# SkyeNetV Plugin Test Script - Version Agnostic
# This script tests the core functionality of the plugin
set -e # Exit on error
echo "=== SkyeNetV Plugin Test ==="
# Find jar file dynamically
JAR_FILE=$(ls target/SkyeNetV-*.jar 2>/dev/null | head -1)
if [ -z "$JAR_FILE" ]; then
echo "❌ No SkyeNetV jar file found in target/"
echo "Available files in target/:"
ls -la target/ 2>/dev/null || echo "target/ directory not found"
exit 1
fi
VERSION=$(basename "$JAR_FILE" | sed 's/SkyeNetV-\(.*\)\.jar/\1/')
echo "✅ Found JAR: $JAR_FILE"
echo "✅ Version: $VERSION"
echo "✅ Size: $(du -h "$JAR_FILE" | cut -f1)"
echo ""
echo "=== JAR Contents Verification ==="
# Check for velocity-plugin.json
if jar tf "$JAR_FILE" | grep -q "velocity-plugin.json"; then
echo "✅ velocity-plugin.json present"
else
echo "❌ velocity-plugin.json missing"
fi
# Check for main class
if jar tf "$JAR_FILE" | grep -q "me/pilkeysek/skyenetv/SkyeNetV.class"; then
echo "✅ Main plugin class found"
else
echo "❌ Main plugin class missing"
fi
# Count command classes
COMMAND_COUNT=$(jar tf "$JAR_FILE" | grep -c "commands.*\.class" || echo "0")
echo "✅ Command classes: $COMMAND_COUNT"
# Count config classes
CONFIG_COUNT=$(jar tf "$JAR_FILE" | grep -c "config.*\.class" || echo "0")
echo "✅ Config classes: $CONFIG_COUNT"
# Count utility classes
UTIL_COUNT=$(jar tf "$JAR_FILE" | grep -c "utils.*\.class" || echo "0")
echo "✅ Utility classes: $UTIL_COUNT"
# Count discord classes
DISCORD_COUNT=$(jar tf "$JAR_FILE" | grep -c "discord.*\.class" || echo "0")
echo "✅ Discord classes: $DISCORD_COUNT"
echo ""
echo "=== Configuration Files ==="
if [ -f "config.yml" ]; then
echo "✅ config.yml exists"
# Check if it contains discord configuration
if grep -q "discord:" "config.yml"; then
echo "✅ Discord configuration found in config.yml"
else
echo "❌ Discord configuration missing from config.yml"
fi
else
echo "❌ config.yml missing"
fi
if [ -f "src/main/resources/rules.json" ]; then
echo "✅ rules.json exists"
else
echo "❌ rules.json missing"
fi
echo ""
echo "=== Plugin Metadata ==="
# Extract and display velocity-plugin.json
if jar xf "$JAR_FILE" velocity-plugin.json 2>/dev/null; then
echo "velocity-plugin.json content:"
echo "---"
cat velocity-plugin.json
echo ""
echo "---"
rm -f velocity-plugin.json
else
echo "❌ Could not extract velocity-plugin.json"
fi
echo ""
echo "=== Summary ==="
echo "Plugin: SkyeNetV $VERSION"
echo "JAR File: $JAR_FILE"
echo "Status: ✅ Ready for deployment"
echo ""
echo "To deploy:"
echo " cp $JAR_FILE /path/to/velocity/plugins/"
echo " # Restart Velocity server"