Compare commits
26 Commits
v2025.0629
...
main
Author | SHA1 | Date | |
---|---|---|---|
4badce0ed4 | |||
fe83fc3d64 | |||
7149b8714e | |||
af95d27964 | |||
3eb78acf70 | |||
3d21d1da7d | |||
344d62034c | |||
78e41214d7 | |||
512ba200c2 | |||
5f04bd23a1 | |||
67bb7f747f | |||
e55fe1a17c | |||
2f056b8500 | |||
fe3c5d2ad9 | |||
2ab38fd053 | |||
9dda4e1649 | |||
d8883c4419 | |||
4c4257eebe | |||
4bb85c63b8 | |||
e5f3569b2a | |||
de200a5bb6 | |||
0f1cfdcc28 | |||
7f937c1090 | |||
d7964d3a78 | |||
719475e29f | |||
70cb5c1b3a |
@ -26,7 +26,10 @@ jobs:
|
|||||||
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
|
password: ${{ secrets.DOCKER_PUSH_TOKEN }}
|
||||||
- name: Build Test Publish All
|
- name: Build Test Publish All
|
||||||
run: |
|
run: |
|
||||||
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} RELEASE_WRITE_TOKEN=${{ secrets.RELEASE_WRITE_TOKEN }} ./buildtestpublish_all.sh --no-cache
|
SOS_WRITE_TOKEN=${{ secrets.SOS_WRITE_TOKEN }} \
|
||||||
|
RELEASE_WRITE_TOKEN=${{ secrets.RELEASE_WRITE_TOKEN }} \
|
||||||
|
GITEA_CONTAINER_NAME=${{ env.JOB_CONTAINER_NAME }} \
|
||||||
|
./buildtestpublish_all.sh
|
||||||
|
|
||||||
test-install-from-scratch:
|
test-install-from-scratch:
|
||||||
needs: [build]
|
needs: [build]
|
||||||
|
@ -2,16 +2,6 @@
|
|||||||
set -uo pipefail # Remove -e to handle errors manually
|
set -uo pipefail # Remove -e to handle errors manually
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
|
||||||
# Parse command line arguments
|
|
||||||
NO_CACHE=false
|
|
||||||
if [[ "$*" == *"--no-cache"* ]]; then
|
|
||||||
NO_CACHE=true
|
|
||||||
export NO_CACHE
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker builder prune -f
|
|
||||||
|
|
||||||
|
|
||||||
# Colors for output
|
# Colors for output
|
||||||
RED='\033[0;31m'
|
RED='\033[0;31m'
|
||||||
GREEN='\033[0;32m'
|
GREEN='\033[0;32m'
|
||||||
@ -119,7 +109,7 @@ function buildtestpublish() {
|
|||||||
# Add to projects list
|
# Add to projects list
|
||||||
PROJECTS+=("$TOOLNAME")
|
PROJECTS+=("$TOOLNAME")
|
||||||
|
|
||||||
cd "$dir" || echo "Failed to cd to $dir"
|
#cd "$dir" || echo "Failed to cd to $dir"
|
||||||
|
|
||||||
subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨"
|
subtitle "🔨 BUILDING $TOOLNAME_UPPER 🔨"
|
||||||
if dothis build "$dir" "$TOOLNAME"; then
|
if dothis build "$dir" "$TOOLNAME"; then
|
||||||
@ -244,15 +234,17 @@ function print_summary() {
|
|||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
title "🔨 BUILDING ALL TOOLS 🔨"
|
title "🔨 BUILDING GETPKG 🔨"
|
||||||
|
|
||||||
getpkg/build.sh
|
"${SCRIPT_DIR}/getpkg/build.sh"
|
||||||
export GETPKG="${SCRIPT_DIR}/getpkg/output/getpkg"
|
export GETPKG="${SCRIPT_DIR}/getpkg/output/getpkg"
|
||||||
if [ ! -f "$GETPKG" ]; then
|
if [ ! -f "$GETPKG" ]; then
|
||||||
echo "Build failed."
|
echo "Build failed."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
title "🔨 BUILDING ALL TOOLS 🔨"
|
||||||
|
|
||||||
buildtestpublish_all
|
buildtestpublish_all
|
||||||
|
|
||||||
print_summary
|
print_summary
|
||||||
|
@ -1,65 +0,0 @@
|
|||||||
ARG IMAGE_TAG
|
|
||||||
FROM gitea.jde.nz/public/dropshell-build-base:latest AS builder
|
|
||||||
|
|
||||||
ARG PROJECT
|
|
||||||
ARG CMAKE_BUILD_TYPE=Debug
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
# Create cache directories
|
|
||||||
RUN mkdir -p /ccache
|
|
||||||
|
|
||||||
# Set up ccache
|
|
||||||
ENV CCACHE_DIR=/ccache
|
|
||||||
ENV CCACHE_COMPILERCHECK=content
|
|
||||||
ENV CCACHE_MAXSIZE=2G
|
|
||||||
|
|
||||||
# Copy build files
|
|
||||||
COPY CMakeLists.txt ./
|
|
||||||
COPY src/version.hpp.in src/
|
|
||||||
|
|
||||||
# Copy source files
|
|
||||||
COPY src/ src/
|
|
||||||
COPY contrib/ contrib/
|
|
||||||
|
|
||||||
# Configure project
|
|
||||||
RUN --mount=type=cache,target=/ccache \
|
|
||||||
--mount=type=cache,target=/build \
|
|
||||||
mkdir -p /build && \
|
|
||||||
cmake -G Ninja -S /app -B /build \
|
|
||||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold -static -g" \
|
|
||||||
-DCMAKE_CXX_FLAGS="-g -fno-omit-frame-pointer" \
|
|
||||||
-DCMAKE_C_FLAGS="-g -fno-omit-frame-pointer" \
|
|
||||||
-DPROJECT_NAME="${PROJECT}" \
|
|
||||||
-DCMAKE_STRIP=OFF \
|
|
||||||
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
|
|
||||||
|
|
||||||
# Build project
|
|
||||||
RUN --mount=type=cache,target=/ccache \
|
|
||||||
--mount=type=cache,target=/build \
|
|
||||||
cmake --build /build
|
|
||||||
|
|
||||||
# Copy the built executable to a regular directory for the final stage
|
|
||||||
RUN --mount=type=cache,target=/build \
|
|
||||||
mkdir -p /output && \
|
|
||||||
find /build -type f -executable -name "*${PROJECT}*" -exec cp {} /output/${PROJECT} \; || \
|
|
||||||
find /build -type f -executable -exec cp {} /output/${PROJECT} \;
|
|
||||||
|
|
||||||
# if we're a release build, then run upx on the binary.
|
|
||||||
RUN if [ "${CMAKE_BUILD_TYPE}" = "Release" ]; then \
|
|
||||||
upx /output/${PROJECT}; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Final stage that only contains the binary
|
|
||||||
FROM scratch AS project
|
|
||||||
|
|
||||||
ARG PROJECT
|
|
||||||
|
|
||||||
# Copy the actual binary from the regular directory
|
|
||||||
COPY --from=builder /output/${PROJECT} /${PROJECT}
|
|
@ -1,29 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Get script directory - handle different execution contexts
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
PROJECT="dehydrate"
|
PROJECT="$(basename "$(dirname "${SCRIPT_DIR}")")"
|
||||||
|
|
||||||
export CMAKE_BUILD_TYPE="Debug"
|
# Debug output for CI
|
||||||
|
echo "${PROJECT} build script running from: ${SCRIPT_DIR}"
|
||||||
|
|
||||||
rm -rf "${SCRIPT_DIR}/output"
|
# Run build in container with mounted directories
|
||||||
mkdir -p "${SCRIPT_DIR}/output"
|
COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
|
||||||
|
-DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE} \
|
||||||
|
-DPROJECT_NAME=${PROJECT} && \
|
||||||
|
cmake --build ./build && \
|
||||||
|
cp ./build/${PROJECT} ./output/"
|
||||||
|
|
||||||
# make sure we have the latest base image.
|
echo "Building in new docker container"
|
||||||
docker pull gitea.jde.nz/public/dropshell-build-base:latest
|
docker run --rm \
|
||||||
|
--user "$(id -u):$(id -g)" \
|
||||||
|
-v "${SCRIPT_DIR}:/app" \
|
||||||
|
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
||||||
|
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||||
|
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
||||||
|
|
||||||
# Build with or without cache based on NO_CACHE environment variable
|
echo "Build complete"
|
||||||
CACHE_FLAG=""
|
|
||||||
if [ "${NO_CACHE:-false}" = "true" ]; then
|
|
||||||
CACHE_FLAG="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
${CACHE_FLAG} \
|
|
||||||
-t "${PROJECT}-build" \
|
|
||||||
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build" \
|
|
||||||
--build-arg PROJECT="${PROJECT}" \
|
|
||||||
--build-arg CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
|
||||||
--output "${SCRIPT_DIR}/output" \
|
|
||||||
"${SCRIPT_DIR}"
|
|
||||||
|
@ -3,22 +3,16 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
PROJECT="dehydrate"
|
PROJECT="$(basename "$(dirname "${SCRIPT_DIR}")")"
|
||||||
|
|
||||||
echo "Cleaning ${PROJECT}..."
|
echo "Cleaning ${PROJECT}..."
|
||||||
|
|
||||||
# Remove output directory
|
# Remove output and build directories
|
||||||
if [ -d "${SCRIPT_DIR}/output" ]; then
|
for dir in "output" "build"; do
|
||||||
echo "Removing output directory..."
|
if [ -d "${SCRIPT_DIR}/${dir}" ]; then
|
||||||
rm -rf "${SCRIPT_DIR}/output"
|
echo "Removing ${dir} directory..."
|
||||||
fi
|
rm -rf "${SCRIPT_DIR:?}/${dir}"
|
||||||
|
fi
|
||||||
# Remove Docker images related to this project
|
done
|
||||||
echo "Removing Docker images..."
|
|
||||||
docker images --filter "reference=${PROJECT}-build*" -q | xargs -r docker rmi -f
|
|
||||||
|
|
||||||
# Remove Docker build cache
|
|
||||||
echo "Pruning Docker build cache..."
|
|
||||||
docker builder prune -f
|
|
||||||
|
|
||||||
echo "✓ ${PROJECT} cleaned successfully"
|
echo "✓ ${PROJECT} cleaned successfully"
|
@ -35,21 +35,7 @@ heading "Building ${PROJECT}"
|
|||||||
|
|
||||||
# build release version
|
# build release version
|
||||||
export CMAKE_BUILD_TYPE="Release"
|
export CMAKE_BUILD_TYPE="Release"
|
||||||
|
"${SCRIPT_DIR}/build.sh"
|
||||||
# Build with or without cache based on NO_CACHE environment variable
|
|
||||||
CACHE_FLAG=""
|
|
||||||
if [ "${NO_CACHE:-false}" = "true" ]; then
|
|
||||||
CACHE_FLAG="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
${CACHE_FLAG} \
|
|
||||||
-t "${PROJECT}-build" \
|
|
||||||
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build" \
|
|
||||||
--build-arg PROJECT="${PROJECT}" \
|
|
||||||
--build-arg CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
|
||||||
--output "${OUTPUT}" \
|
|
||||||
"${SCRIPT_DIR}"
|
|
||||||
|
|
||||||
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
|
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
PROJECT_DIR="$( cd "$SCRIPT_DIR/.." && pwd )"
|
PROJECT_DIR="$( cd "$SCRIPT_DIR/.." && pwd )"
|
||||||
|
|
||||||
cd "$SCRIPT_DIR"
|
cd "$SCRIPT_DIR" || exit 1
|
||||||
|
|
||||||
# Clean up old test data and any existing binaries
|
# Clean up old test data and any existing binaries
|
||||||
# Force removal with chmod to handle permission issues
|
# Force removal with chmod to handle permission issues
|
||||||
|
@ -1,76 +0,0 @@
|
|||||||
ARG IMAGE_TAG
|
|
||||||
FROM gitea.jde.nz/public/dropshell-build-base:latest AS builder
|
|
||||||
|
|
||||||
ARG PROJECT
|
|
||||||
ARG CMAKE_BUILD_TYPE=Debug
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
SHELL ["/bin/bash", "-c"]
|
|
||||||
|
|
||||||
# Create cache directories
|
|
||||||
RUN mkdir -p /ccache
|
|
||||||
|
|
||||||
# Set up ccache
|
|
||||||
ENV CCACHE_DIR=/ccache
|
|
||||||
ENV CCACHE_COMPILERCHECK=content
|
|
||||||
ENV CCACHE_MAXSIZE=2G
|
|
||||||
|
|
||||||
# Copy only build files first (for better layer caching)
|
|
||||||
COPY CMakeLists.txt cmake_prebuild.sh ./
|
|
||||||
COPY src/version.hpp.in src/
|
|
||||||
|
|
||||||
# Run prebuild script early (this rarely changes)
|
|
||||||
RUN bash cmake_prebuild.sh
|
|
||||||
|
|
||||||
# Copy source files (this invalidates cache when source changes)
|
|
||||||
COPY src/ src/
|
|
||||||
|
|
||||||
# Configure project (this step is cached unless CMakeLists.txt changes)
|
|
||||||
RUN --mount=type=cache,target=/ccache \
|
|
||||||
--mount=type=cache,target=/build \
|
|
||||||
mkdir -p /build && \
|
|
||||||
cmake -G Ninja -S /app -B /build \
|
|
||||||
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
|
|
||||||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
||||||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
||||||
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold -static -g" \
|
|
||||||
-DCMAKE_CXX_FLAGS="-g -fno-omit-frame-pointer" \
|
|
||||||
-DPROJECT_NAME="${PROJECT}" \
|
|
||||||
-DCMAKE_STRIP=OFF \
|
|
||||||
${CMAKE_TOOLCHAIN_FILE:+-DCMAKE_TOOLCHAIN_FILE=$CMAKE_TOOLCHAIN_FILE}
|
|
||||||
|
|
||||||
# Run prebuild script
|
|
||||||
RUN --mount=type=cache,target=/ccache \
|
|
||||||
--mount=type=cache,target=/build \
|
|
||||||
cmake --build /build --target run_prebuild_script
|
|
||||||
|
|
||||||
# Build project (ccache will help here when only some files change)
|
|
||||||
RUN --mount=type=cache,target=/ccache \
|
|
||||||
--mount=type=cache,target=/build \
|
|
||||||
cmake --build /build
|
|
||||||
|
|
||||||
# Copy the built executable to a regular directory for the final stage
|
|
||||||
RUN --mount=type=cache,target=/build \
|
|
||||||
mkdir -p /output && \
|
|
||||||
find /build -type f -executable -name "*${PROJECT}*" -exec cp {} /output/${PROJECT} \; || \
|
|
||||||
find /build -type f -executable -exec cp {} /output/${PROJECT} \;
|
|
||||||
|
|
||||||
|
|
||||||
# if we're a release build, then run upx on the binary.
|
|
||||||
RUN if [ "${CMAKE_BUILD_TYPE}" = "Release" ]; then \
|
|
||||||
upx /output/${PROJECT}; \
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Final stage that only contains the binary
|
|
||||||
FROM scratch AS project
|
|
||||||
|
|
||||||
ARG PROJECT
|
|
||||||
|
|
||||||
# Copy CA certificates for SSL validation
|
|
||||||
#COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/
|
|
||||||
|
|
||||||
# Copy the actual binary from the regular directory
|
|
||||||
COPY --from=builder /output/${PROJECT} /${PROJECT}
|
|
||||||
|
|
@ -1,32 +1,26 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Get script directory - handle different execution contexts
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
|
PROJECT="$(basename "$(dirname "${SCRIPT_DIR}")")"
|
||||||
|
|
||||||
|
# Debug output for CI
|
||||||
|
echo "${PROJECT} build script running from: ${SCRIPT_DIR}"
|
||||||
|
|
||||||
export CMAKE_BUILD_TYPE="Debug"
|
# Run build in container with mounted directories
|
||||||
|
COMMAND_TO_RUN="cmake -G Ninja -S . -B ./build \
|
||||||
|
-DCMAKE_BUILD_TYPE=\${CMAKE_BUILD_TYPE} \
|
||||||
|
-DPROJECT_NAME=${PROJECT} && \
|
||||||
|
cmake --build ./build && \
|
||||||
|
cp ./build/${PROJECT} ./output/"
|
||||||
|
|
||||||
rm -rf "${SCRIPT_DIR}/output"
|
echo "Building in new docker container"
|
||||||
mkdir -p "${SCRIPT_DIR}/output"
|
docker run --rm \
|
||||||
|
--user "$(id -u):$(id -g)" \
|
||||||
PROJECT="getpkg"
|
-v "${SCRIPT_DIR}:/app" \
|
||||||
|
-e CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-Debug}" \
|
||||||
# make sure we have the latest base image.
|
gitea.jde.nz/public/dropshell-build-base:latest \
|
||||||
docker pull gitea.jde.nz/public/dropshell-build-base:latest
|
bash -c "cd /app && ${COMMAND_TO_RUN}"
|
||||||
|
|
||||||
# Build with or without cache based on NO_CACHE environment variable
|
|
||||||
CACHE_FLAG=""
|
|
||||||
if [ "${NO_CACHE:-false}" = "true" ]; then
|
|
||||||
CACHE_FLAG="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
${CACHE_FLAG} \
|
|
||||||
-t "${PROJECT}-build" \
|
|
||||||
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build" \
|
|
||||||
--build-arg PROJECT="${PROJECT}" \
|
|
||||||
--build-arg CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
|
||||||
--output "${SCRIPT_DIR}/output" \
|
|
||||||
"${SCRIPT_DIR}"
|
|
||||||
|
|
||||||
|
echo "Build complete"
|
||||||
|
@ -3,22 +3,16 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||||
PROJECT="getpkg"
|
PROJECT="$(basename "$(dirname "${SCRIPT_DIR}")")"
|
||||||
|
|
||||||
echo "Cleaning ${PROJECT}..."
|
echo "Cleaning ${PROJECT}..."
|
||||||
|
|
||||||
# Remove output directory
|
# Remove output and build directories
|
||||||
if [ -d "${SCRIPT_DIR}/output" ]; then
|
for dir in "output" "build"; do
|
||||||
echo "Removing output directory..."
|
if [ -d "${SCRIPT_DIR}/${dir}" ]; then
|
||||||
rm -rf "${SCRIPT_DIR}/output"
|
echo "Removing ${dir} directory..."
|
||||||
fi
|
rm -rf "${SCRIPT_DIR:?}/${dir}"
|
||||||
|
fi
|
||||||
# Remove Docker images related to this project
|
done
|
||||||
echo "Removing Docker images..."
|
|
||||||
docker images --filter "reference=${PROJECT}-build*" -q | xargs -r docker rmi -f
|
|
||||||
|
|
||||||
# Remove Docker build cache
|
|
||||||
echo "Pruning Docker build cache..."
|
|
||||||
docker builder prune -f
|
|
||||||
|
|
||||||
echo "✓ ${PROJECT} cleaned successfully"
|
echo "✓ ${PROJECT} cleaned successfully"
|
@ -34,22 +34,7 @@ heading "Building ${PROJECT}"
|
|||||||
|
|
||||||
# build release version
|
# build release version
|
||||||
export CMAKE_BUILD_TYPE="Release"
|
export CMAKE_BUILD_TYPE="Release"
|
||||||
|
"${SCRIPT_DIR}/build.sh"
|
||||||
# Build with or without cache based on NO_CACHE environment variable
|
|
||||||
CACHE_FLAG=""
|
|
||||||
if [ "${NO_CACHE:-false}" = "true" ]; then
|
|
||||||
CACHE_FLAG="--no-cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
docker build \
|
|
||||||
${CACHE_FLAG} \
|
|
||||||
-t "${PROJECT}-build" \
|
|
||||||
-f "${SCRIPT_DIR}/Dockerfile.dropshell-build" \
|
|
||||||
--build-arg PROJECT="${PROJECT}" \
|
|
||||||
--build-arg CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}" \
|
|
||||||
--output "${OUTPUT}" \
|
|
||||||
"${SCRIPT_DIR}"
|
|
||||||
|
|
||||||
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
|
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
|
||||||
|
|
||||||
#--------------------------------------------------------------------------------
|
#--------------------------------------------------------------------------------
|
||||||
|
@ -455,12 +455,13 @@ EOF
|
|||||||
CONFIG_EXISTS=false
|
CONFIG_EXISTS=false
|
||||||
TOOL_DIR_EXISTS=false
|
TOOL_DIR_EXISTS=false
|
||||||
SYMLINK_EXISTS=false
|
SYMLINK_EXISTS=false
|
||||||
HELPER_SYMLINK_EXISTS=false
|
# HELPER_SYMLINK_EXISTS=false
|
||||||
|
|
||||||
[ -f ~/.config/getpkg/"${TEST_UNINSTALL_TOOL}.json" ] && CONFIG_EXISTS=true
|
[ -f ~/.config/getpkg/"${TEST_UNINSTALL_TOOL}.json" ] && CONFIG_EXISTS=true
|
||||||
[ -d ~/.getpkg/"$TEST_UNINSTALL_TOOL" ] && TOOL_DIR_EXISTS=true
|
[ -d ~/.getpkg/"$TEST_UNINSTALL_TOOL" ] && TOOL_DIR_EXISTS=true
|
||||||
[ -L ~/.local/bin/getpkg/"$TEST_UNINSTALL_TOOL" ] && SYMLINK_EXISTS=true
|
[ -L ~/.local/bin/getpkg/"$TEST_UNINSTALL_TOOL" ] && SYMLINK_EXISTS=true
|
||||||
[ -L ~/.local/bin/getpkg/"${TEST_UNINSTALL_TOOL}-helper" ] && HELPER_SYMLINK_EXISTS=true
|
# Check if helper symlink exists (not currently used in validation)
|
||||||
|
# [ -L ~/.local/bin/getpkg/"${TEST_UNINSTALL_TOOL}-helper" ] && HELPER_SYMLINK_EXISTS=true
|
||||||
|
|
||||||
if $CONFIG_EXISTS && $TOOL_DIR_EXISTS && $SYMLINK_EXISTS; then
|
if $CONFIG_EXISTS && $TOOL_DIR_EXISTS && $SYMLINK_EXISTS; then
|
||||||
# Now uninstall
|
# Now uninstall
|
||||||
@ -589,7 +590,7 @@ echo "Universal arch unpublish test"' > "$UNPUBLISH_TEST_DIR/$UNPUBLISH_TOOL_CUS
|
|||||||
UNPUBLISH_CUSTOM_OUTPUT=$("$GETPKG" unpublish "$UNPUBLISH_TOOL_CUSTOM" 2>&1)
|
UNPUBLISH_CUSTOM_OUTPUT=$("$GETPKG" unpublish "$UNPUBLISH_TOOL_CUSTOM" 2>&1)
|
||||||
UNPUBLISH_CUSTOM_EXIT_CODE=$?
|
UNPUBLISH_CUSTOM_EXIT_CODE=$?
|
||||||
|
|
||||||
if [ $UNPUBLISH_CUSTOM_EXIT_CODE -eq 0 ] && [[ "$UNPUBLISH_CUSTOM_OUTPUT" =~ "Found ${UNPUBLISH_TOOL_CUSTOM}:universal" ]]; then
|
if [ $UNPUBLISH_CUSTOM_EXIT_CODE -eq 0 ] && [[ "$UNPUBLISH_CUSTOM_OUTPUT" =~ Found\ ${UNPUBLISH_TOOL_CUSTOM}:universal ]]; then
|
||||||
print_test_result "Unpublish finds universal architecture" 0
|
print_test_result "Unpublish finds universal architecture" 0
|
||||||
else
|
else
|
||||||
print_test_result "Unpublish finds universal architecture" 1
|
print_test_result "Unpublish finds universal architecture" 1
|
||||||
|
Reference in New Issue
Block a user