From 2d0dcfc5b09020df8ae60858626612165f0c3a95 Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Tue, 8 Aug 2023 14:18:12 +0200 Subject: [PATCH] Use -P. --- .github/workflows/windows.yml | 7 ++++--- src/bin/buildForWindows.sh | 3 +-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 3fc7085e6..0c065584d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -15,11 +15,15 @@ jobs: || (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) name: Build .zip runs-on: windows-latest + defaults: + run: + shell: msys2 {0} steps: - uses: msys2/setup-msys2@v2 with: release: false + update: false path-type: inherit install: >- zip @@ -36,17 +40,14 @@ jobs: src/bin/doc/package-lock.json - name: Install all dependencies and symlink for ep_etherpad-lite - shell: msys2 {0} run: | set MSYSTEM=winsymlinks:lnk src/bin/installDeps.sh - name: Run the backend tests - shell: msys2 {0} run: cd src && npm test - name: Build the .zip - shell: msys2 {0} run: | set MSYSTEM=winsymlinks:lnk src/bin/buildForWindows.sh diff --git a/src/bin/buildForWindows.sh b/src/bin/buildForWindows.sh index c4e188644..7dc66a565 100755 --- a/src/bin/buildForWindows.sh +++ b/src/bin/buildForWindows.sh @@ -19,7 +19,6 @@ workdir=$(try git rev-parse --show-toplevel) || exit 1 try cd "${workdir}" [ -f src/package.json ] || fatal "failed to cd to etherpad root directory" -file -L bin # See https://github.com/msys2/MSYS2-packages/issues/1216 export MSYSTEM=winsymlinks:lnk @@ -30,7 +29,7 @@ trap 'exit 1' HUP INT TERM trap 'log "cleaning up..."; try cd / && try rm -rf "${TMP_FOLDER}"' EXIT log "create a clean environment in $TMP_FOLDER..." -try git archive --format=tar HEAD | (try cd "${TMP_FOLDER}" && try tar xf -) \ +try git archive --format=zip HEAD | (try cd "${TMP_FOLDER}" && try tar xf -P -) \ || fatal "failed to copy etherpad to temporary folder" try mkdir "${TMP_FOLDER}"/.git try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD