-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·58 lines (48 loc) · 1.59 KB
/
build.sh
File metadata and controls
executable file
·58 lines (48 loc) · 1.59 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
#!/bin/bash
# Build script for TriplyDB Java uploader
set -e
echo "Building TriplyDB Java Uploader..."
# Check if Maven is installed
if ! command -v mvn &> /dev/null; then
echo "Error: Maven is not installed."
echo "Please install Maven 3.6 or higher:"
echo " Ubuntu/Debian: sudo apt install maven"
echo " macOS: brew install maven"
echo " Or download from: https://maven.apache.org/download.cgi"
exit 1
fi
# Check Maven version
MVN_VERSION=$(mvn -version | head -n 1 | awk '{print $3}')
echo "Using Maven version: $MVN_VERSION"
# Check if Java is installed
if ! command -v java &> /dev/null; then
echo "Error: Java is not installed."
echo "Please install Java 11 or higher:"
echo " Ubuntu/Debian: sudo apt install openjdk-11-jdk"
echo " macOS: brew install openjdk@11"
exit 1
fi
# Check Java version
JAVA_VERSION=$(java -version 2>&1 | head -n 1 | awk -F '"' '{print $2}' | awk -F '.' '{print $1}')
echo "Using Java version: $(java -version 2>&1 | head -n 1)"
if [ "$JAVA_VERSION" -lt 11 ]; then
echo "Warning: Java 11 or higher is recommended (found Java $JAVA_VERSION)"
fi
# Clean and build
echo ""
echo "Cleaning previous build..."
mvn clean
echo ""
echo "Compiling and packaging..."
mvn package -DskipTests
echo ""
echo "✓ Build complete!"
echo ""
echo "The executable JAR is located at: target/triplydb-uploader-1.0.0.jar"
echo ""
echo "To use the uploader:"
echo " java -jar target/triplydb-uploader-1.0.0.jar \\"
echo " --file path/to/data.ttl \\"
echo " --account your-account \\"
echo " --dataset your-dataset \\"
echo " --token YOUR_API_TOKEN"