mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
Fix/windows build (#5861)
* Use updated env var. * Show bin and src bin. * Use native link. * Use link. * Check file link. * Use existing installation on github runner. * Use -P. * Use git checkout for copying the data to temp directory. * Use rsync to copy data. * Remove package from src. * Use simple copy to copy the dependencies. * Copy src folder only.
This commit is contained in:
parent
89201632ca
commit
2f5b6b80e1
2 changed files with 16 additions and 7 deletions
17
.github/workflows/windows.yml
vendored
17
.github/workflows/windows.yml
vendored
|
@ -15,13 +15,19 @@ jobs:
|
||||||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id)
|
||||||
name: Build .zip
|
name: Build .zip
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: msys2 {0}
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
uses: msys2/setup-msys2@v2
|
uses: msys2/setup-msys2@v2
|
||||||
with:
|
with:
|
||||||
|
release: false
|
||||||
|
update: false
|
||||||
path-type: inherit
|
path-type: inherit
|
||||||
install: >-
|
install: >-
|
||||||
zip
|
zip
|
||||||
|
rsync
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -35,16 +41,17 @@ jobs:
|
||||||
src/bin/doc/package-lock.json
|
src/bin/doc/package-lock.json
|
||||||
-
|
-
|
||||||
name: Install all dependencies and symlink for ep_etherpad-lite
|
name: Install all dependencies and symlink for ep_etherpad-lite
|
||||||
shell: msys2 {0}
|
run: |
|
||||||
run: src/bin/installDeps.sh
|
set MSYSTEM=winsymlinks:lnk
|
||||||
|
src/bin/installDeps.sh
|
||||||
-
|
-
|
||||||
name: Run the backend tests
|
name: Run the backend tests
|
||||||
shell: msys2 {0}
|
|
||||||
run: cd src && npm test
|
run: cd src && npm test
|
||||||
-
|
-
|
||||||
name: Build the .zip
|
name: Build the .zip
|
||||||
shell: msys2 {0}
|
run: |
|
||||||
run: src/bin/buildForWindows.sh
|
set MSYSTEM=winsymlinks:lnk
|
||||||
|
src/bin/buildForWindows.sh
|
||||||
-
|
-
|
||||||
name: Archive production artifacts
|
name: Archive production artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
|
|
|
@ -20,7 +20,7 @@ try cd "${workdir}"
|
||||||
[ -f src/package.json ] || fatal "failed to cd to etherpad root directory"
|
[ -f src/package.json ] || fatal "failed to cd to etherpad root directory"
|
||||||
|
|
||||||
# See https://github.com/msys2/MSYS2-packages/issues/1216
|
# See https://github.com/msys2/MSYS2-packages/issues/1216
|
||||||
export MSYS=winsymlinks:lnk
|
export MSYSTEM=winsymlinks:lnk
|
||||||
|
|
||||||
OUTPUT=${workdir}/etherpad-win.zip
|
OUTPUT=${workdir}/etherpad-win.zip
|
||||||
|
|
||||||
|
@ -29,10 +29,12 @@ trap 'exit 1' HUP INT TERM
|
||||||
trap 'log "cleaning up..."; try cd / && try rm -rf "${TMP_FOLDER}"' EXIT
|
trap 'log "cleaning up..."; try cd / && try rm -rf "${TMP_FOLDER}"' EXIT
|
||||||
|
|
||||||
log "create a clean environment in $TMP_FOLDER..."
|
log "create a clean environment in $TMP_FOLDER..."
|
||||||
try git archive --format=tar HEAD | (try cd "${TMP_FOLDER}" && try tar xf -) \
|
try export GIT_WORK_TREE=${TMP_FOLDER}; git checkout HEAD -f \
|
||||||
|| fatal "failed to copy etherpad to temporary folder"
|
|| fatal "failed to copy etherpad to temporary folder"
|
||||||
try mkdir "${TMP_FOLDER}"/.git
|
try mkdir "${TMP_FOLDER}"/.git
|
||||||
try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD
|
try git rev-parse HEAD >${TMP_FOLDER}/.git/HEAD
|
||||||
|
try cp -r ./src/node_modules "${TMP_FOLDER}"/src/node_modules
|
||||||
|
|
||||||
try cd "${TMP_FOLDER}"
|
try cd "${TMP_FOLDER}"
|
||||||
[ -f src/package.json ] || fatal "failed to copy etherpad to temporary folder"
|
[ -f src/package.json ] || fatal "failed to copy etherpad to temporary folder"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue