forked from OWASP/wrongsecrets
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-workflow.sh
More file actions
36 lines (27 loc) · 830 Bytes
/
test-workflow.sh
File metadata and controls
36 lines (27 loc) · 830 Bytes
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
#!/bin/bash
set -e
echo "🔧 Testing workflow commands locally..."
# Make sure Maven wrapper is executable
chmod +x ./mvnw
# Extract version
echo "📦 Extracting version from pom.xml..."
VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
echo "Version: $VERSION"
# Verify the version format
if [[ -z "$VERSION" ]]; then
echo "❌ Version extraction failed"
exit 1
fi
echo "✅ Version extracted successfully: $VERSION"
# Test compilation (without running full package to save time)
echo "🏗️ Testing compilation..."
./mvnw compile -q
echo "✅ Compilation successful"
# Check if target directory exists
if [[ -d "target" ]]; then
echo "✅ Target directory exists"
else
echo "❌ Target directory missing"
exit 1
fi
echo "🎉 All workflow prerequisite tests passed!"