Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/CICD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -829,11 +829,23 @@ jobs:
if: matrix.job.skip-package != true
shell: bash
run: |
## Package artifact(s)
# binary
## Package artifact(s)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move all of this into a python script, it is too hard to understand and therefor maintain

# manpages, completions, and uudoc (if exist)
cp 'target/${{ matrix.job.target }}/release/uudoc${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' && \
(mkdir -p '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/'{man/man1,bash-completion/completions,fish/vendor_completions.d,zsh/site-functions,elvish/lib,powershell}
for binary in $(./target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }} --list|grep -v -E '^(\[)$');do
./target/${{ matrix.job.target }}/release/uudoc manpage $binary > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/man/man1/${binary}.1
./target/${{ matrix.job.target }}/release/uudoc completion $binary bash > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/bash-completion/completions/${binary}.bash
./target/${{ matrix.job.target }}/release/uudoc completion $binary fish > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/fish/vendor_completions.d/${binary}.fish
./target/${{ matrix.job.target }}/release/uudoc completion $binary zsh > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/zsh/site-functions/_${binary}.bash
./target/${{ matrix.job.target }}/release/uudoc completion $binary elvish > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/elvish/lib/${binary}.elv
./target/${{ matrix.job.target }}/release/uudoc completion $binary powershell > ${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/share/powershell/${binary}.ps1
done) || :
# coreutils
cp 'target/${{ matrix.job.target }}/release/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/'
# `strip` binary (if needed)
if [ -n "${{ steps.vars.outputs.STRIP }}" ]; then "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/${{ env.PROJECT_NAME }}${{ steps.vars.outputs.EXE_suffix }}' ; fi
[ -n "${{ steps.vars.outputs.STRIP }}" ] && "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/coreutils${{ steps.vars.outputs.EXE_suffix }}
[ -n "${{ steps.vars.outputs.STRIP }}" ] && "${{ steps.vars.outputs.STRIP }}" '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/uudoc${{ steps.vars.outputs.EXE_suffix }} || :
# README and LICENSE
# * spell-checker:ignore EADME ICENSE
(shopt -s nullglob; for f in [R]"EADME"{,.*}; do cp $f '${{ steps.vars.outputs.STAGING }}/${{ steps.vars.outputs.PKG_BASENAME }}/' ; done)
Expand Down
Loading