Bug fixing
This commit is contained in:
23
build.sh
23
build.sh
@@ -64,15 +64,24 @@ cd $SCRIPT_DIR
|
|||||||
mkdir -p ${CACHE_DIR}
|
mkdir -p ${CACHE_DIR}
|
||||||
mkdir -p ${EXE_DIR}
|
mkdir -p ${EXE_DIR}
|
||||||
|
|
||||||
title "Building linux-arm64 executable"
|
BUILDSTR="amd64"
|
||||||
build linux-arm64 || die "Failed to build linux-arm64 executable"
|
|
||||||
|
|
||||||
title "Building linux-x86_64 executable"
|
if [ ! -z "$1" ]; then
|
||||||
build linux-x86_64 || die "Failed to build linux-x86_64 executable"
|
BUILDSTR="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Compile completed successfully!"
|
if [ "$BUILDSTR" == "all" || "$BUILDSTR" == "arm64" ]; then
|
||||||
echo "x86_64 executable: ./simple_object_storage-linux-x86_64"
|
title "Building linux-arm64 executable"
|
||||||
echo "arm64 executable: ./simple_object_storage-linux-arm64"
|
build linux-arm64 || die "Failed to build linux-arm64 executable"
|
||||||
|
echo "arm64 executable: ./simple_object_storage-linux-arm64"
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if [ "$BUILDSTR" == "all" || "$BUILDSTR" == "amd64" ]; then
|
||||||
|
title "Building linux-x86_64 executable"
|
||||||
|
build linux-x86_64 || die "Failed to build linux-x86_64 executable"
|
||||||
|
mv ${EXE_DIR}/simple_object_storage-linux-x86_64 ${EXE_DIR}/simple_object_storage-linux-amd64
|
||||||
|
echo "amd64 executable: ./simple_object_storage-linux-amd64"
|
||||||
|
fi;
|
||||||
|
|
||||||
echo "Build completed successfully!"
|
echo "Build completed successfully!"
|
||||||
|
|
||||||
|
17
publish.sh
17
publish.sh
@@ -34,14 +34,12 @@ function die() {
|
|||||||
cd $SCRIPT_DIR
|
cd $SCRIPT_DIR
|
||||||
|
|
||||||
# build the executables
|
# build the executables
|
||||||
./build.sh
|
./build.sh all
|
||||||
|
|
||||||
# build the Docker image
|
|
||||||
./build-docker.sh
|
|
||||||
|
|
||||||
# push the Docker image to the registry
|
# push the Docker image to the registry
|
||||||
|
|
||||||
if [ ! -f ${EXE_DIR}/simple_object_storage-linux-x86_64 ]; then
|
if [ ! -f ${EXE_DIR}/simple_object_storage-linux-amd64 ]; then
|
||||||
die "x86_64 executable not found"
|
die "x86_64 executable not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -49,19 +47,8 @@ if [ ! -f ${EXE_DIR}/simple_object_storage-linux-arm64 ]; then
|
|||||||
die "arm64 executable not found"
|
die "arm64 executable not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# build the executables.
|
|
||||||
./build.sh
|
|
||||||
|
|
||||||
# use Docker architecture style
|
|
||||||
cp ${EXE_DIR}/simple_object_storage-linux-x86_64 ${EXE_DIR}/simple_object_storage-linux-amd64
|
|
||||||
|
|
||||||
echo "amd64 executable: ./simple_object_storage-linux-amd64"
|
|
||||||
echo "arm64 executable: ./simple_object_storage-linux-arm64"
|
|
||||||
|
|
||||||
echo "Building multi-platform Docker image"
|
echo "Building multi-platform Docker image"
|
||||||
docker buildx build --push -t gitea.jde.nz/public/simple-object-storage:latest --platform linux/amd64,linux/arm64 .
|
docker buildx build --push -t gitea.jde.nz/public/simple-object-storage:latest --platform linux/amd64,linux/arm64 .
|
||||||
|
|
||||||
rm ${EXE_DIR}/simple_object_storage-linux-amd64
|
|
||||||
|
|
||||||
echo "Build completed successfully!"
|
echo "Build completed successfully!"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user