From fce794a55ebad3116a80d6a819848e8e94ad142d Mon Sep 17 00:00:00 2001 From: Michael Lynch Date: Sun, 27 Aug 2023 08:01:09 -0400 Subject: [PATCH] Exclude directory structure from binary packages (#467) Previously, it was releasing the folder name in addition to the binary. This fixes it so it just releases the binary by itself. --- dev-scripts/package-binaries | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/dev-scripts/package-binaries b/dev-scripts/package-binaries index a31f10c9..e5077245 100755 --- a/dev-scripts/package-binaries +++ b/dev-scripts/package-binaries @@ -16,9 +16,14 @@ readonly VERSION # Exit on unset variable. set -u +# Change directory to repository root. +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" +readonly SCRIPT_DIR +cd "${SCRIPT_DIR}/.." + cd build -readonly OUTPUT_DIR="../dist" +readonly OUTPUT_DIR="${PWD}/../dist" mkdir -p "${OUTPUT_DIR}" for d in ./*_*; do @@ -34,9 +39,10 @@ for d in ./*_*; do ARCH="${FOLDER_PARTS[*]}" ARCH="${ARCH//[[:blank:]]}" + pushd "$d" tar \ --create \ - --verbose \ --file="${OUTPUT_DIR}/picoshare-v${VERSION}-${OS}-${ARCH}.tar.gz" \ - "${d}/picoshare" + picoshare + popd done