-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_plugin_old.sh
More file actions
executable file
·136 lines (112 loc) · 3.7 KB
/
test_plugin_old.sh
File metadata and controls
executable file
·136 lines (112 loc) · 3.7 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
#!/bin/bash
# SkyeNetV Plugin Test Script
# This script tests the core functionality of the plugin
echo "=== SkyeNetV Plugin Test ==="
# Find jar file dynamically
JAR_FILE=$(ls target/SkyeNetV-*.jar 2>/dev/null | head -1)
if [ -n "$JAR_FILE" ]; then
echo "Plugin JAR: $(ls -la $JAR_FILE)"
echo "Version: $(basename $JAR_FILE | sed 's/SkyeNetV-\(.*\)\.jar/\1/')"
else
echo "❌ No SkyeNetV jar file found in target/"
exit 1
fi
echo ""
echo "=== JAR Contents Check ==="
echo "Checking for velocity-plugin.json..."
jar tf $JAR_FILE | grep velocity-plugin.json
echo ""
echo "Checking for main class..."
jar tf $JAR_FILE | grep "SkyeNetV.class"
echo ""
echo "Checking for all command classes..."
jar tf $JAR_FILE | grep "commands.*\.class"
echo ""
echo "Checking for configuration classes..."
jar tf $JAR_FILE | grep "config.*\.class"
echo ""
echo "Checking for utility classes..."
jar tf $JAR_FILE | grep "utils.*\.class"
echo ""
echo "Checking for discord classes..."
jar tf $JAR_FILE | grep "discord.*\.class"in Test Script
# This script tests the core functionality of the plugin
echo "=== SkyeNetV Plugin Test ==="
echo "Plugin JAR: $(ls -la target/SkyeNetV-*.jar)"
echo ""
echo "=== JAR Contents Check ==="
echo "Checking for velocity-plugin.json..."
jar tf target/SkyeNetV-2.4.3.jar | grep velocity-plugin.json
echo ""
echo "Checking for main class..."
jar tf target/SkyeNetV-2.4.3.jar | grep "SkyeNetV.class"
echo ""
echo "Checking for all command classes..."
jar tf target/SkyeNetV-2.4.3.jar | grep "commands.*\.class"
echo ""
echo "Checking for configuration classes..."
jar tf target/SkyeNetV-2.4.3.jar | grep "config.*\.class"
echo ""
echo "Checking for module classes..."
jar tf target/SkyeNetV-2.4.3.jar | grep "modules.*\.class"
echo ""
echo "=== Configuration Files ==="
echo "Discord config sample:"
if [ -f config.yml ]; then
echo "✅ config.yml created"
# 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
echo ""
echo "Rules configuration:"
if [ -f src/main/resources/rules.json ]; then
echo "✅ rules.json present"
else
echo "❌ rules.json missing"
fi
echo ""
echo "=== Plugin Metadata ==="
echo "Checking velocity-plugin.json content..."
jar xf "$JAR_FILE" velocity-plugin.json 2>/dev/null
if [ -f velocity-plugin.json ]; then
echo "Found velocity-plugin.json in $JAR_FILE:"
echo ""
echo "--- velocity-plugin.json ---"
cat velocity-plugin.json | python3 -m json.tool 2>/dev/null || cat velocity-plugin.json
echo ""
echo "--- end velocity-plugin.json ---"
rm velocity-plugin.json
else
echo "❌ Could not extract velocity-plugin.json from $JAR_FILE"
fi
echo ""
echo "=== Class Verification ==="
echo "Verifying key classes exist:"
# Check main classes
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
# Check command classes
COMMAND_COUNT=$(jar tf "$JAR_FILE" | grep "commands.*\.class" | wc -l)
echo "✅ Found $COMMAND_COUNT command classes"
# Check config classes
CONFIG_COUNT=$(jar tf "$JAR_FILE" | grep "config.*\.class" | wc -l)
echo "✅ Found $CONFIG_COUNT configuration classes"
echo ""
echo "=== Version Information ==="
VERSION=$(basename $JAR_FILE | sed 's/SkyeNetV-\(.*\)\.jar/\1/')
echo "Plugin Version: $VERSION"
echo "JAR File Size: $(du -h $JAR_FILE | cut -f1)"
echo "Build Date: $(stat -c %y $JAR_FILE | cut -d' ' -f1)"
echo ""
echo "=== Test Complete ==="
echo "Plugin JAR: $JAR_FILE"
echo "Status: ✅ Ready for deployment!"