-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create build script for making releases
- Loading branch information
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,7 @@ | |
*.pyc | ||
*.stackdump | ||
.gdb_history | ||
|
||
# Build artifacts | ||
build-log* | ||
pscrypto-lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,6 @@ else | |
lib-name = lib$(1).so | ||
exe-name = $(1) | ||
endif | ||
|
||
export OS | ||
export ARCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#!/bin/bash | ||
set -ue | ||
|
||
CONFIGS=3 | ||
BUILD_MATRIX_PREFIX=("x86_64-w64-mingw32-" "i686-w64-mingw32-" "x86_64-linux-gnu-") | ||
BUILD_MATRIX_ARTIFACT=("pscrypto.dll" "pscrypto.dll" "libpscrypto.so") | ||
BUILD_MATRIX_JAVA_FOLDER=("win32-x86-64" "win32-x86" "linux-x86-64") | ||
|
||
BUILD_DEST="pscrypto-lib" | ||
read -p "What version: " VERSION | ||
|
||
mkdir -p "$BUILD_DEST" | ||
|
||
echo "Now building $CONFIGS pscrypto configs for v$VERSION" | ||
|
||
for i in `seq 1 $CONFIGS`; do | ||
iter=$(( $i-1 )) | ||
javaFolder=${BUILD_MATRIX_JAVA_FOLDER[$iter]} | ||
|
||
export PREFIX=${BUILD_MATRIX_PREFIX[$iter]} | ||
|
||
echo "Now building $javaFolder..." | ||
make clean > /dev/null 2>&1 | ||
make -j > "build-log-${javaFolder}.txt" 2>&1 | ||
|
||
mkdir -p "$BUILD_DEST/$javaFolder" | ||
cp "pscrypto/${BUILD_MATRIX_ARTIFACT[$iter]}" "$BUILD_DEST/$javaFolder/" | ||
done | ||
|
||
echo "Builds ${BUILD_MATRIX_JAVA_FOLDER[*]} complete" | ||
echo "Build folder: $BUILD_DEST" | ||
|
||
cat <<EOF > "$BUILD_DEST/README.txt" | ||
This contains native PSCrypto libraries for use in the JVM. | ||
See https://github.com/psforever/PSCrypto for more details. | ||
EOF | ||
|
||
cat <<EOF > "$BUILD_DEST/VERSION.txt" | ||
$VERSION | ||
EOF | ||
|
||
echo "Build listing: " | ||
ls -R $BUILD_DEST |