mirror of
https://github.com/watchexec/watchexec.git
synced 2024-11-13 07:41:11 +01:00
Use cargo-deb to replace existing deb kludge
This commit is contained in:
parent
4526ba2cae
commit
1eaaf7e844
2 changed files with 19 additions and 22 deletions
26
.github/workflows/release.yml
vendored
26
.github/workflows/release.yml
vendored
|
@ -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 <aur@passcod.name>
|
||||
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
|
||||
|
|
|
@ -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 <felix@passcod.name>"
|
||||
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"],
|
||||
]
|
||||
|
||||
|
|
Loading…
Reference in a new issue