diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 094f6f7..94c1c2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,6 +84,9 @@ jobs: with: path: ~/.cargo/registry key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} + + - name: Install cargo-deb + run: cargo install cargo-deb --version 1.30.0 - uses: actions-rs/toolchain@v1 with: target: ${{ matrix.target }} @@ -141,28 +144,7 @@ jobs: set -euxo pipefail version=$(cat VERSION) dst="watchexec-${version}-${{ matrix.target }}" - mkdir -p "deb/$dst" - cd "deb/$dst" - mkdir -p DEBIAN usr/{bin,share/{man/man1,doc/watchexec,zsh/site-functions}} - cp "../../$dst/watchexec" usr/bin/ - cp "../../$dst/watchexec.1" usr/share/man/man1/ - cp "../../$dst/watchexec.1.html" usr/share/doc/watchexec/ - cp "../../$dst/completions/zsh" usr/share/zsh/site-functions/_watchexec - cat <<-CONTROL > DEBIAN/control - Package: watchexec - Version: ${version} - Architecture: $(echo "${{ matrix.name }}" | cut -d- -f2) - Maintainer: Félix Saparelli - Installed-Size: $(du -d1 usr | tail -n1 | cut -d\t -f1) - Homepage: https://github.com/watchexec/watchexec - Description: Executes commands in response to file modifications. - Software development often involves running the same commands over and over. Boring! - Watchexec is a simple, standalone tool that watches a path and runs a command whenever it detects modifications. - CONTROL - cd .. - fakeroot dpkg -b "$dst" - mv "$dst.deb" ../ - cd .. + cargo deb -p watchexec-cli --target ${{ matrix.target }} --output "$dst.deb" - name: Archive (zip) if: startsWith(matrix.name, 'windows-') shell: bash diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 011c9a8..1b6f52a 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -48,3 +48,18 @@ pkg-fmt = "txz" [package.metadata.binstall.overrides.x86_64-pc-windows-msvc] pkg-url = "{ repo }/releases/download/cli-v{ version }/watchexec-{ version }-{ target }.zip" pkg-fmt = "zip" + +[package.metadata.deb] +maintainer = "Félix Saparelli " +license-file = ["../LICENSE", "0"] +section = "utility" +# conf-files = [] # look me up when config file lands +assets = [ + ["../target/release/watchexec", "usr/bin/", "755"], + ["README.md", "usr/share/doc/watchexec/README", "644"], + ["../doc/watchexec.1.html", "usr/share/doc/watchexec/watchexec.1.html", "644"], + ["../doc/watchexec.1", "usr/share/man/man1/watchexec.1.html", "644"], + ["../completions/zsh", "usr/share/zsh/site-functions/_watchexec", "644"], + ["../doc/logo.svg", "usr/share/icons/hicolor/scalable/apps/watchexec.svg", "644"], +] +