Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg: add completion files to winget/msi installer #1666

Merged
merged 4 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
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
12 changes: 8 additions & 4 deletions .github/workflows/build_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ jobs:
path: release

build-msi:
name: "Build MSI installer"
name: "Build MSI (WiX) installer"
runs-on: "windows-2019"
timeout-minutes: 12
steps:
Expand All @@ -325,13 +325,17 @@ jobs:
toolchain: stable
target: x86_64-pc-windows-msvc

- name: Install cargo-wix
shell: powershell
run: |
cargo install cargo-wix --version 0.3.8 --locked

- name: Build MSI file
shell: powershell
env:
BTM_GENERATE: ""
BTM_GENERATE: true
run: |
cargo install cargo-wix --version 0.3.8 --locked
cargo wix
cargo wix --nocapture

- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
echo "Release version: ${{ env.RELEASE_VERSION }}"

- name: Automatically create PR for winget repos
uses: vedantmgoyal2009/winget-releaser@0db4f0a478166abd0fa438c631849f0b8dcfb99f
uses: vedantmgoyal2009/winget-releaser@4ffc7888bffd451b357355dc214d43bb9f23917e
with:
identifier: Clement.bottom
installers-regex: '^bottom_x86_64_installer\.msi$'
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ depends = "libc6:armhf (>= 2.28)"
[package.metadata.wix]
output = "bottom_x86_64_installer.msi"


[package.metadata.generate-rpm]
assets = [
{ source = "target/release/btm", dest = "/usr/bin/", mode = "755" },
Expand Down
53 changes: 53 additions & 0 deletions wix/main.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,53 @@
Source='wix\License.rtf'
KeyPath='yes'/>
</Component>

<Directory Id='Completions' Name='completions'>
<Component Id='btmPowershell' Guid='*'>
<File
Id='btmPs1'
Name='_btm.ps1'
DiskId='1'
Source='$(var.CargoTargetDir)\tmp\bottom\completion\_btm.ps1'
KeyPath='yes'/>
</Component>

<Component Id='btmNu' Guid='*'>
<File
Id='btmNu'
Name='btm.nu'
DiskId='1'
Source='$(var.CargoTargetDir)\tmp\bottom\completion\btm.nu'
KeyPath='yes'/>
</Component>

<Component Id='btmFish' Guid='*'>
<File
Id='btmFish'
Name='btm.fish'
DiskId='1'
Source='$(var.CargoTargetDir)\tmp\bottom\completion\btm.fish'
KeyPath='yes'/>
</Component>

<Component Id='btmBash' Guid='*'>
<File
Id='btmBash'
Name='btm.bash'
DiskId='1'
Source='$(var.CargoTargetDir)\tmp\bottom\completion\btm.bash'
KeyPath='yes'/>
</Component>

<Component Id='btmZsh' Guid='*'>
<File
Id='btmZsh'
Name='_btm'
DiskId='1'
Source='$(var.CargoTargetDir)\tmp\bottom\completion\_btm'
KeyPath='yes'/>
</Component>
</Directory>

<Directory Id='Bin' Name='bin'>
<Component Id='Path' Guid='15D841CF-0363-4DBB-BF55-ECCB43B9EB03' KeyPath='yes'>
Expand Down Expand Up @@ -141,6 +188,12 @@
-->
<ComponentRef Id='License'/>

<ComponentRef Id='btmPowershell'/>
<ComponentRef Id='btmNu'/>
<ComponentRef Id='btmFish'/>
<ComponentRef Id='btmBash'/>
<ComponentRef Id='btmZsh'/>

<ComponentRef Id='binary0'/>

<Feature
Expand Down