mirror of
https://github.com/psforever/PSCrypto.git
synced 2026-07-13 23:44:37 +00:00
Create build script for making releases
This commit is contained in:
parent
b9b522f12f
commit
d6de0fc30e
4 changed files with 51 additions and 1 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -6,3 +6,7 @@
|
||||||
*.pyc
|
*.pyc
|
||||||
*.stackdump
|
*.stackdump
|
||||||
.gdb_history
|
.gdb_history
|
||||||
|
|
||||||
|
# Build artifacts
|
||||||
|
build-log*
|
||||||
|
pscrypto-lib
|
||||||
|
|
|
||||||
|
|
@ -75,3 +75,6 @@ else
|
||||||
lib-name = lib$(1).so
|
lib-name = lib$(1).so
|
||||||
exe-name = $(1)
|
exe-name = $(1)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
export OS
|
||||||
|
export ARCH
|
||||||
|
|
|
||||||
2
external/psf-cryptopp
vendored
2
external/psf-cryptopp
vendored
|
|
@ -1 +1 @@
|
||||||
Subproject commit dcd6893c58009cf72e0370b77b2e72479ffd387f
|
Subproject commit 28b6e6e6edaf340e2369707283a990ea24943f6b
|
||||||
43
scripts/build.sh
Executable file
43
scripts/build.sh
Executable file
|
|
@ -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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue