Bug fixing
This commit is contained in:
23
publish.sh
23
publish.sh
@@ -33,6 +33,14 @@ function die() {
|
||||
#--------------------------------
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
# build the executables
|
||||
./build.sh
|
||||
|
||||
# build the Docker image
|
||||
./build-docker.sh
|
||||
|
||||
# push the Docker image to the registry
|
||||
|
||||
if [ ! -f ${EXE_DIR}/simple_object_storage-linux-x86_64 ]; then
|
||||
die "x86_64 executable not found"
|
||||
fi
|
||||
@@ -41,24 +49,19 @@ if [ ! -f ${EXE_DIR}/simple_object_storage-linux-arm64 ]; then
|
||||
die "arm64 executable not found"
|
||||
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 "Setting up Docker BuildX builder 'sosbuilder'"
|
||||
# Check if builder instance exists
|
||||
if ! docker buildx inspect sosbuilder > /dev/null 2>&1; then
|
||||
echo "Builder 'sosbuilder' not found, creating..."
|
||||
docker buildx create --name sosbuilder
|
||||
else
|
||||
echo "Builder 'sosbuilder' already exists."
|
||||
fi
|
||||
# Ensure the builder is used
|
||||
docker buildx use sosbuilder
|
||||
echo "Building multi-platform Docker image"
|
||||
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!"
|
||||
|
||||
|
Reference in New Issue
Block a user