add completions and man pages to release archives #43

This commit is contained in:
Clément DOUIN 2023-02-21 16:06:58 +01:00
parent 21d8d57f72
commit 22fb1b8dee
No known key found for this signature in database
GPG key ID: 353E4A18EE0FAB72
3 changed files with 22 additions and 4 deletions

View file

@ -54,10 +54,26 @@ jobs:
args: --release
- name: Compress executable (unix)
if: matrix.os_name == 'linux' || matrix.os_name == 'macos'
run: tar czf himalaya.tar.gz -C target/release himalaya
run: |
mkdir -p target/release/{man,completions}
target/release/himalaya man target/release/man
target/release/himalaya completion bash > target/release/completions/himalaya.bash
target/release/himalaya completion elvish > target/release/completions/himalaya.elvish
target/release/himalaya completion fish > target/release/completions/himalaya.fish
target/release/himalaya completion powershell > target/release/completions/himalaya.powershell
target/release/himalaya completion zsh > target/release/completions/himalaya.zsh
tar czf himalaya.tar.gz -C target/release himalaya man completions
- name: Compress executable (windows)
if: matrix.os_name == 'windows'
run: tar czf himalaya.tar.gz -C target/release himalaya.exe
run: |
mkdir -p target/release/{man,completions}
target/release/himalaya.exe man target/release/man
target/release/himalaya.exe completion bash > target/release/completions/himalaya.bash
target/release/himalaya.exe completion elvish > target/release/completions/himalaya.elvish
target/release/himalaya.exe completion fish > target/release/completions/himalaya.fish
target/release/himalaya.exe completion powershell > target/release/completions/himalaya.powershell
target/release/himalaya.exe completion zsh > target/release/completions/himalaya.zsh
tar czf himalaya.tar.gz -C target/release himalaya.exe man completions
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:

View file

@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Added `create` and `delete` folder commands [sourcehut#54].
- Added generated completions and man pages to releases
[sourcehut#43].
### Fixed
@ -675,4 +677,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#419]: https://github.com/soywod/himalaya/issues/419
[#430]: https://github.com/soywod/himalaya/issues/430
[sourcehut#43]: https://todo.sr.ht/~soywod/pimalaya/43
[sourcehut#54]: https://todo.sr.ht/~soywod/pimalaya/54

View file

@ -77,8 +77,7 @@ fn main() -> Result<()> {
_ => (),
}
// checks completion command before configs
// https://github.com/soywod/himalaya/issues/115
// also checks man command before configs
match man::args::matches(&m)? {
Some(man::args::Cmd::GenerateAll(dir)) => {
return man::handlers::generate(dir, create_app());