release: watchexec-cli v1.24.0 (#699)
Co-authored-by: Félix Saparelli <felix@passcod.name> Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
parent
a166b3bc9f
commit
477d59d319
|
@ -34,7 +34,7 @@ $ cargo publish -p <%= crate.name %>
|
|||
```
|
||||
<% } %>
|
||||
|
||||
To trigger builds initially: either close and then immediately re-open this PR once, or **enable auto-merge**.
|
||||
To trigger builds initially: either close and then immediately re-open this PR once, or push to the branch (perhaps with edits to the README.md or CHANGELOG.md!).
|
||||
|
||||
<% if (pr.releaseNotes) { %>
|
||||
---
|
||||
|
|
|
@ -44,7 +44,7 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
version: ${{ inputs.version }}
|
||||
crate-path: crates/${{ inputs.crate }}
|
||||
pr-release-notes: true
|
||||
pr-release-notes: ${{ inputs.crate == 'cli' }}
|
||||
pr-label: release
|
||||
pr-template-file: .github/workflows/release-pr.ejs
|
||||
env:
|
||||
|
|
|
@ -72,6 +72,17 @@ jobs:
|
|||
- name: Check that CLI runs
|
||||
run: cargo run ${{ env.flags }} -p watchexec-cli -- -1 echo
|
||||
|
||||
- name: Install coreutils on mac
|
||||
if: ${{ matrix.platform == 'macos' }}
|
||||
run: brew install coreutils
|
||||
|
||||
- name: Run watchexec integration tests (unix)
|
||||
if: ${{ matrix.platform != 'windows' }}
|
||||
run: crates/cli/run-tests.sh
|
||||
shell: bash
|
||||
env:
|
||||
WATCHEXEC_BIN: target/debug/watchexec
|
||||
|
||||
- name: Run bosion integration tests
|
||||
run: ./run-tests.sh
|
||||
working-directory: crates/bosion
|
||||
|
@ -122,15 +133,14 @@ jobs:
|
|||
- run: cross check --target x86_64-unknown-freebsd
|
||||
- run: cross check --target x86_64-unknown-netbsd
|
||||
|
||||
# Dummy job to have a stable name for the "all tests pass" requirement
|
||||
tests-pass:
|
||||
if: always() # always run even if dependencies fail
|
||||
if: always()
|
||||
name: Tests pass
|
||||
needs:
|
||||
- test
|
||||
- cross-checks
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# fail if ANY dependency has failed or been skipped or cancelled
|
||||
- if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')"
|
||||
run: exit 1
|
||||
- uses: re-actors/alls-green@release/v1
|
||||
with:
|
||||
jobs: ${{ toJSON(needs) }}
|
||||
|
|
|
@ -3,8 +3,8 @@ message: |
|
|||
If you use this software, please cite it using these metadata.
|
||||
title: "Watchexec: a tool to react to filesystem changes, and a crate ecosystem to power it"
|
||||
|
||||
version: "1.23.0"
|
||||
date-released: 2023-08-30
|
||||
version: "1.24.0"
|
||||
date-released: 2023-12-09
|
||||
|
||||
repository-code: https://github.com/watchexec/watchexec
|
||||
license: Apache-2.0
|
||||
|
|
|
@ -3682,7 +3682,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "watchexec-cli"
|
||||
version = "1.23.0"
|
||||
version = "1.24.0"
|
||||
dependencies = [
|
||||
"argfile",
|
||||
"bosion",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "watchexec-cli"
|
||||
version = "1.23.0"
|
||||
version = "1.24.0"
|
||||
|
||||
authors = ["Félix Saparelli <felix@passcod.name>", "Matt Green <mattgreenrocks@gmail.com>"]
|
||||
license = "Apache-2.0"
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
watchexec=${WATCHEXEC_BIN:-watchexec}
|
||||
|
||||
$watchexec -1 --env FOO=BAR echo '$FOO' | grep BAR
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
watchexec=${WATCHEXEC_BIN:-watchexec}
|
||||
|
||||
$watchexec -1 -n echo 'foo bar' | grep 'foo bar'
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
watchexec=${WATCHEXEC_BIN:-watchexec}
|
||||
|
||||
timeout -s9 30s sh -c "sleep 10 | $watchexec --stdin-quit echo"
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
export WATCHEXEC_BIN=$(realpath ${WATCHEXEC_BIN:-$(which watchexec)})
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/integration"
|
||||
for test in *.sh; do
|
||||
echo
|
||||
echo
|
||||
echo "======= Testing $test ======="
|
||||
./$test
|
||||
done
|
|
@ -242,14 +242,18 @@ pub struct Args {
|
|||
/// Takes a pair of signal names, separated by a colon, such as "TERM:INT" to map SIGTERM to
|
||||
/// SIGINT. The first signal is the one received by watchexec, and the second is the one sent to
|
||||
/// the command. The second can be omitted to discard the first signal, such as "TERM:" to
|
||||
/// not do anything on SIGTERM. Note this can make it hard to quit watchexec itself.
|
||||
/// not do anything on SIGTERM.
|
||||
///
|
||||
/// If SIGINT or SIGTERM are mapped, then they no longer quit Watchexec. Besides making it hard
|
||||
/// to quit Watchexec itself, this is useful to send pass a Ctrl-C to the command without also
|
||||
/// terminating Watchexec and the underlying program with it, e.g. with "INT:INT".
|
||||
///
|
||||
/// This option can be specified multiple times to map multiple signals.
|
||||
///
|
||||
/// Signal syntax is case-insensitive for short names (like "TERM", "USR2") and long names (like
|
||||
/// "SIGKILL", "SIGHUP"). Signal numbers are also supported (like "15", "31"). On Windows, the
|
||||
/// forms "STOP", "CTRL+C", "CTRL+BREAK", and "CTRL+CLOSE" are also supported to parse, but will
|
||||
/// not actually do anything as Watchexec cannot yet deliver nor receive those events.
|
||||
/// forms "STOP", "CTRL+C", and "CTRL+BREAK" are also supported to receive, but Watchexec cannot
|
||||
/// yet deliver other "signals" than a STOP.
|
||||
#[arg(long = "map-signal", value_name = "SIGNAL:SIGNAL", value_parser = SignalMappingValueParser)]
|
||||
pub signal_map: Vec<SignalMapping>,
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ use std::{
|
|||
env::current_dir,
|
||||
ffi::{OsStr, OsString},
|
||||
fs::File,
|
||||
io::{stderr, IsTerminal, Write},
|
||||
io::{IsTerminal, Write},
|
||||
path::Path,
|
||||
process::Stdio,
|
||||
sync::Arc,
|
||||
|
@ -147,6 +147,7 @@ pub fn make_config(args: &Args, state: &State) -> Result<Config> {
|
|||
|
||||
let delay_run = args.delay_run.map(|ts| ts.0);
|
||||
let on_busy = args.on_busy_update;
|
||||
let stdin_quit = args.stdin_quit;
|
||||
|
||||
let signal = args.signal;
|
||||
let stop_signal = args.stop_signal;
|
||||
|
@ -256,7 +257,7 @@ pub fn make_config(args: &Args, state: &State) -> Result<Config> {
|
|||
.events
|
||||
.iter()
|
||||
.any(|e| e.tags.contains(&Tag::Keyboard(Keyboard::Eof)));
|
||||
if is_keyboard_eof {
|
||||
if stdin_quit && is_keyboard_eof {
|
||||
debug!("keyboard EOF, quit");
|
||||
show_events();
|
||||
action.quit();
|
||||
|
@ -561,8 +562,9 @@ fn end_of_process(state: &CommandState, outflags: OutputFlags) {
|
|||
}
|
||||
|
||||
if outflags.bell {
|
||||
eprint!("\x07");
|
||||
stderr().flush().ok();
|
||||
let mut stdout = std::io::stdout();
|
||||
stdout.write_all(b"\x07").ok();
|
||||
stdout.flush().ok();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Watchexec.Cli.watchexec"
|
||||
version="1.23.0.0"
|
||||
version="1.24.0.0"
|
||||
/>
|
||||
|
||||
<trustInfo>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Next (YYYY-MM-DD)
|
||||
|
||||
## v2.0.0 (2023-11-27)
|
||||
## v2.0.0 (2023-12-09)
|
||||
|
||||
- Depend on `watchexec-events` instead of the `watchexec` re-export.
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
## Next (YYYY-MM-DD)
|
||||
|
||||
## v2.0.0 (2023-11-27)
|
||||
## v2.0.0 (2023-12-09)
|
||||
|
||||
- Depend on `watchexec-events` instead of the `watchexec` re-export.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.TH watchexec 1 "watchexec 1.23.0"
|
||||
.TH watchexec 1 "watchexec 1.24.0"
|
||||
.SH NAME
|
||||
watchexec \- Execute commands when watched files change
|
||||
.SH SYNOPSIS
|
||||
|
@ -101,11 +101,13 @@ This has no practical effect on Windows as the command is always forcefully term
|
|||
\fB\-\-map\-signal\fR=\fISIGNAL:SIGNAL\fR
|
||||
Translate signals from the OS to signals to send to the command
|
||||
|
||||
Takes a pair of signal names, separated by a colon, such as "TERM:INT" to map SIGTERM to SIGINT. The first signal is the one received by watchexec, and the second is the one sent to the command. The second can be omitted to discard the first signal, such as "TERM:" to not do anything on SIGTERM. Note this can make it hard to quit watchexec itself.
|
||||
Takes a pair of signal names, separated by a colon, such as "TERM:INT" to map SIGTERM to SIGINT. The first signal is the one received by watchexec, and the second is the one sent to the command. The second can be omitted to discard the first signal, such as "TERM:" to not do anything on SIGTERM.
|
||||
|
||||
If SIGINT or SIGTERM are mapped, then they no longer quit Watchexec. Besides making it hard to quit Watchexec itself, this is useful to send pass a Ctrl\-C to the command without also terminating Watchexec and the underlying program with it, e.g. with "INT:INT".
|
||||
|
||||
This option can be specified multiple times to map multiple signals.
|
||||
|
||||
Signal syntax is case\-insensitive for short names (like "TERM", "USR2") and long names (like "SIGKILL", "SIGHUP"). Signal numbers are also supported (like "15", "31"). On Windows, the forms "STOP", "CTRL+C", "CTRL+BREAK", and "CTRL+CLOSE" are also supported to parse, but will not actually do anything as Watchexec cannot yet deliver nor receive those events.
|
||||
Signal syntax is case\-insensitive for short names (like "TERM", "USR2") and long names (like "SIGKILL", "SIGHUP"). Signal numbers are also supported (like "15", "31"). On Windows, the forms "STOP", "CTRL+C", and "CTRL+BREAK" are also supported to receive, but Watchexec cannot yet deliver other "signals" than a STOP.
|
||||
.TP
|
||||
\fB\-d\fR, \fB\-\-debounce\fR=\fITIMEOUT\fR
|
||||
Time to wait for new events before taking action
|
||||
|
@ -522,6 +524,6 @@ Use @argfile as first argument to load arguments from the file \*(Aqargfile\*(Aq
|
|||
|
||||
Didn\*(Aqt expect this much output? Use the short \*(Aq\-h\*(Aq flag to get short help.
|
||||
.SH VERSION
|
||||
v1.23.0
|
||||
v1.24.0
|
||||
.SH AUTHORS
|
||||
Félix Saparelli <felix@passcod.name>, Matt Green <mattgreenrocks@gmail.com>
|
||||
|
|
|
@ -170,17 +170,20 @@ Takes a pair of signal names, separated by a colon, such as \"TERM:INT\"
|
|||
to map SIGTERM to SIGINT. The first signal is the one received by
|
||||
watchexec, and the second is the one sent to the command. The second can
|
||||
be omitted to discard the first signal, such as \"TERM:\" to not do
|
||||
anything on SIGTERM. Note this can make it hard to quit watchexec
|
||||
itself.
|
||||
anything on SIGTERM.
|
||||
|
||||
If SIGINT or SIGTERM are mapped, then they no longer quit Watchexec.
|
||||
Besides making it hard to quit Watchexec itself, this is useful to send
|
||||
pass a Ctrl-C to the command without also terminating Watchexec and the
|
||||
underlying program with it, e.g. with \"INT:INT\".
|
||||
|
||||
This option can be specified multiple times to map multiple signals.
|
||||
|
||||
Signal syntax is case-insensitive for short names (like \"TERM\",
|
||||
\"USR2\") and long names (like \"SIGKILL\", \"SIGHUP\"). Signal numbers
|
||||
are also supported (like \"15\", \"31\"). On Windows, the forms
|
||||
\"STOP\", \"CTRL+C\", \"CTRL+BREAK\", and \"CTRL+CLOSE\" are also
|
||||
supported to parse, but will not actually do anything as Watchexec
|
||||
cannot yet deliver nor receive those events.
|
||||
\"STOP\", \"CTRL+C\", and \"CTRL+BREAK\" are also supported to receive,
|
||||
but Watchexec cannot yet deliver other \"signals\" than a STOP.
|
||||
|
||||
**-d**, **\--debounce**=*TIMEOUT*
|
||||
|
||||
|
@ -758,7 +761,7 @@ Didnt expect this much output? Use the short -h flag to get short help.
|
|||
|
||||
# VERSION
|
||||
|
||||
v1.23.0
|
||||
v1.24.0
|
||||
|
||||
# AUTHORS
|
||||
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
import time
|
||||
|
||||
while True:
|
||||
print "hi"
|
||||
time.sleep(1)
|
Loading…
Reference in New Issue