feat: Update 4 files
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 20s
Build-Test-Publish / build (linux/arm64) (push) Successful in 26s

This commit is contained in:
Your Name
2025-09-02 20:31:24 +12:00
parent 54b3b09a88
commit dc717b7064
4 changed files with 16 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ARCH=$(uname -m)
PROJECT="$(basename "${SCRIPT_DIR}")"
OUTPUT="${SCRIPT_DIR}/output"
VERSION=$(date -u +"%Y.%m%d.%H%M")
function heading() {
echo "--------------------------------"
@@ -30,10 +31,16 @@ mkdir -p "${OUTPUT}"
#--------------------------------------------------------------------------------
heading "Building ${PROJECT}"
# Replace __VERSION__ in the source file before building
sed -i "s|__VERSION__|${VERSION}|g" "${SCRIPT_DIR}/dshash/main.cpp"
# build release version
"${SCRIPT_DIR}/build.sh"
[ -f "${OUTPUT}/${PROJECT}" ] || die "Build failed."
# Restore the placeholder for future builds
sed -i "s|${VERSION}|__VERSION__|g" "${SCRIPT_DIR}/dshash/main.cpp"
# install getpkg
GETPKG_PATH="${HOME}/.local/bin/getpkg/getpkg"
if [ ! -f "${GETPKG_PATH}" ]; then