From 5e2ee8bf29b58286c53432941519f0a6f1f878ca Mon Sep 17 00:00:00 2001 From: Dain Nilsson Date: Tue, 30 Apr 2024 12:40:04 +0200 Subject: [PATCH] MacOS: Preserve symlinks --- .github/workflows/macOS.yml | 5 +++++ resources/macos/make_release.sh | 9 +++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/macOS.yml b/.github/workflows/macOS.yml index 02f5fa89..7baa3d4c 100644 --- a/.github/workflows/macOS.yml +++ b/.github/workflows/macOS.yml @@ -57,6 +57,11 @@ jobs: working-directory: ./dist run: ./scripts/make_pkg.sh + - name: Tar to preserve symlinks + run: | + tar -czf dist/ykman.tar.gz -C dist "ykman" + rm -rf dist/ykman/ + - name: Upload build uses: actions/upload-artifact@v4 with: diff --git a/resources/macos/make_release.sh b/resources/macos/make_release.sh index 50dbd0ed..3e2ad586 100755 --- a/resources/macos/make_release.sh +++ b/resources/macos/make_release.sh @@ -14,13 +14,10 @@ CWD=`pwd` SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" echo "Script dir: $SCRIPT_DIR" +echo "Unpack from tar.gz" SOURCE_DIR="$CWD/ykman" - -# Ensure executable, since we may have unpacked from zip -chmod +x $SOURCE_DIR/ykman - -# Remove Python framework directory as it isn't needed -rm -rf $SOURCE_DIR/_internal/Python.framework +rm -rf $SOURCE_DIR +tar xfa ykman.tar.gz RELEASE_VERSION=`$SOURCE_DIR/ykman --version | awk '{print $(NF)}'` PKG="yubikey-manager-$RELEASE_VERSION-mac.pkg"