Apply tabs project-wide
This commit is contained in:
parent
33f8b60e46
commit
23d794ed7e
|
@ -1,25 +1,17 @@
|
||||||
root = true
|
root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
[lib/**/*.rs]
|
[*.{md,ronn}]
|
||||||
indent_style = tab
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
[*.toml]
|
|
||||||
indent_size = 2
|
[*.{cff,yml}]
|
||||||
|
indent_size = 2
|
||||||
[*.yml]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.wat]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
[*.md]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 3
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
"lib",
|
"lib",
|
||||||
"cli",
|
"cli",
|
||||||
]
|
]
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
|
|
45
bin/sign
45
bin/sign
|
@ -3,42 +3,41 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
if ! which rsign >/dev/null; then
|
if ! which rsign >/dev/null; then
|
||||||
echo "Requires rsign2 tool: $ cargo install rsign2"
|
echo "Requires rsign2 tool: $ cargo install rsign2"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
missing=""
|
missing=""
|
||||||
for f in {B3,SHA512}SUMS{,.auto.minisig}; do
|
for f in {B3,SHA512}SUMS{,.auto.minisig}; do
|
||||||
[[ ! -f "$f" ]] && missing="$missing $f"
|
[[ ! -f "$f" ]] && missing="$missing $f"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ ! -z "$missing" ]]; then
|
if [[ ! -z "$missing" ]]; then
|
||||||
echo "Usage: bin/sign [rsign options...]"
|
echo "Usage: bin/sign [rsign options...]"
|
||||||
echo "You must first download the relevant sums and minisig files."
|
echo "You must first download the relevant sums and minisig files."
|
||||||
echo "Missing: $missing"
|
echo "Missing: $missing"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sigs=""
|
sigs=""
|
||||||
for algo in B3 SHA512; do
|
for algo in B3 SHA512; do
|
||||||
|
echo "Verifying ${algo}SUMS.auto.minisig:"
|
||||||
|
rsign verify \
|
||||||
|
-p "$(dirname $BASH_SOURCE)/../.github/workflows/release.pub" \
|
||||||
|
-x "${algo}SUMS.auto.minisig" \
|
||||||
|
"${algo}SUMS"
|
||||||
|
|
||||||
echo "Verifying ${algo}SUMS.auto.minisig:"
|
version=$(grep -m1 -oP 'watchexec-[\d.]+' "${algo}SUMS" | cut -d- -f3)
|
||||||
rsign verify \
|
ownsig="${algo}SUMS.$(whoami).minisig"
|
||||||
-p "$(dirname $BASH_SOURCE)/../.github/workflows/release.pub" \
|
sigs="$sigs $ownsig"
|
||||||
-x "${algo}SUMS.auto.minisig" \
|
|
||||||
"${algo}SUMS"
|
|
||||||
|
|
||||||
version=$(grep -m1 -oP 'watchexec-[\d.]+' "${algo}SUMS" | cut -d- -f3)
|
echo "Signing ${algo}SUMS with your key to $ownsig:"
|
||||||
ownsig="${algo}SUMS.$(whoami).minisig"
|
rsign sign \
|
||||||
sigs="$sigs $ownsig"
|
-t "watchexec $version signed by maintainer: $(whoami)" \
|
||||||
|
-c 'see README.md for signing information' \
|
||||||
echo "Signing ${algo}SUMS with your key to $ownsig:"
|
-x "$ownsig" \
|
||||||
rsign sign \
|
$@ \
|
||||||
-t "watchexec $version signed by maintainer: $(whoami)" \
|
"${algo}SUMS"
|
||||||
-c 'see README.md for signing information' \
|
|
||||||
-x "$ownsig" \
|
|
||||||
$@ \
|
|
||||||
"${algo}SUMS"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Done; please upload $sigs to Github release $version!"
|
echo "Done; please upload $sigs to Github release $version!"
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
fn main() {
|
fn main() {
|
||||||
embed_resource::compile("watchexec-manifest.rc");
|
embed_resource::compile("watchexec-manifest.rc");
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,20 +5,20 @@ use insta::assert_snapshot;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn help() {
|
fn help() {
|
||||||
let output = Command::cargo_bin("watchexec")
|
let output = Command::cargo_bin("watchexec")
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.arg("--help")
|
.arg("--help")
|
||||||
.output()
|
.output()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
assert!(output.status.success(), "--help returns 0");
|
assert!(output.status.success(), "--help returns 0");
|
||||||
assert_eq!(output.stderr, Vec::<u8>::new(), "--help stderr is empty");
|
assert_eq!(output.stderr, Vec::<u8>::new(), "--help stderr is empty");
|
||||||
assert_snapshot!(
|
assert_snapshot!(
|
||||||
if cfg!(windows) {
|
if cfg!(windows) {
|
||||||
"help_windows"
|
"help_windows"
|
||||||
} else {
|
} else {
|
||||||
"help_unix"
|
"help_unix"
|
||||||
},
|
},
|
||||||
String::from_utf8(output.stdout).unwrap()
|
String::from_utf8(output.stdout).unwrap()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,41 +1,41 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
type="win32"
|
type="win32"
|
||||||
name="Watchexec.Cli.watchexec"
|
name="Watchexec.Cli.watchexec"
|
||||||
version="1.17.1.0"
|
version="1.17.1.0"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<trustInfo>
|
<trustInfo>
|
||||||
<security>
|
<security>
|
||||||
<!--
|
<!--
|
||||||
UAC settings:
|
UAC settings:
|
||||||
- app should run at same integrity level as calling process
|
- app should run at same integrity level as calling process
|
||||||
- app does not need to manipulate windows belonging to
|
- app does not need to manipulate windows belonging to
|
||||||
higher-integrity-level processes
|
higher-integrity-level processes
|
||||||
-->
|
-->
|
||||||
<requestedPrivileges>
|
<requestedPrivileges>
|
||||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||||
</requestedPrivileges>
|
</requestedPrivileges>
|
||||||
</security>
|
</security>
|
||||||
</trustInfo>
|
</trustInfo>
|
||||||
|
|
||||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
<application>
|
<application>
|
||||||
<!-- Windows 10 -->
|
<!-- Windows 10 -->
|
||||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
<!-- Windows 8.1 -->
|
<!-- Windows 8.1 -->
|
||||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
<!-- Windows 8 -->
|
<!-- Windows 8 -->
|
||||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
</application>
|
</application>
|
||||||
</compatibility>
|
</compatibility>
|
||||||
|
|
||||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
<windowsSettings xmlns:ws="http://schemas.microsoft.com/SMI/2020/WindowsSettings">
|
<windowsSettings xmlns:ws="http://schemas.microsoft.com/SMI/2020/WindowsSettings">
|
||||||
<ws:longPathAware xmlns:ws="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</ws:longPathAware>
|
<ws:longPathAware xmlns:ws="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</ws:longPathAware>
|
||||||
<ws:activeCodePage xmlns:ws="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</ws:activeCodePage>
|
<ws:activeCodePage xmlns:ws="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</ws:activeCodePage>
|
||||||
<ws:heapType xmlns:ws="http://schemas.microsoft.com/SMI/2020/WindowsSettings">SegmentHeap</ws:heapType>
|
<ws:heapType xmlns:ws="http://schemas.microsoft.com/SMI/2020/WindowsSettings">SegmentHeap</ws:heapType>
|
||||||
</windowsSettings>
|
</windowsSettings>
|
||||||
</application>
|
</application>
|
||||||
</assembly>
|
</assembly>
|
||||||
|
|
|
@ -9,31 +9,31 @@ local -a _comp_priv_prefix
|
||||||
cmd="$words[1]"
|
cmd="$words[1]"
|
||||||
|
|
||||||
args=(
|
args=(
|
||||||
'(-c --clear)'{-c,--clear}'[Clear screen before executing command]'
|
'(-c --clear)'{-c,--clear}'[Clear screen before executing command]'
|
||||||
'(-h --help)'{-h,--help}'[Prints help information]'
|
'(-h --help)'{-h,--help}'[Prints help information]'
|
||||||
'--shell=[Change the wrapping shell, or set to none to disable]'
|
'--shell=[Change the wrapping shell, or set to none to disable]'
|
||||||
'--no-shell[Deprecated, use --shell=none]'
|
'--no-shell[Deprecated, use --shell=none]'
|
||||||
'-n[Shorthand for --shell=none]'
|
'-n[Shorthand for --shell=none]'
|
||||||
'--no-environment[Do not set WATCHEXEC_*_PATH environment variables for command]'
|
'--no-environment[Do not set WATCHEXEC_*_PATH environment variables for command]'
|
||||||
'--no-meta[Ignore metadata changes]'
|
'--no-meta[Ignore metadata changes]'
|
||||||
'(-p --postpone)'{-p,--postpone}'[Wait until first change to execute command]'
|
'(-p --postpone)'{-p,--postpone}'[Wait until first change to execute command]'
|
||||||
'(-r --restart)'{-r,--restart}'[Restart the process if it''s still running]'
|
'(-r --restart)'{-r,--restart}'[Restart the process if it''s still running]'
|
||||||
'(-W --watch-when-idle)'{-W,--watch-when-idle}'[Ignore events while the command is still running]'
|
'(-W --watch-when-idle)'{-W,--watch-when-idle}'[Ignore events while the command is still running]'
|
||||||
'(-V --version)'{-V,--version}'[Prints version information]'
|
'(-V --version)'{-V,--version}'[Prints version information]'
|
||||||
'(-v --verbose)'{-v,--verbose}'[Print debugging messages to stderr]'
|
'(-v --verbose)'{-v,--verbose}'[Print debugging messages to stderr]'
|
||||||
'--changes-only[Print changed paths to stderr for pattern debugging]'
|
'--changes-only[Print changed paths to stderr for pattern debugging]'
|
||||||
'(-d --debounce)'{-d+,--debounce=}'[Set the timeout between detected change and command execution, defaults to 100ms]:milliseconds'
|
'(-d --debounce)'{-d+,--debounce=}'[Set the timeout between detected change and command execution, defaults to 100ms]:milliseconds'
|
||||||
'(-e --exts)'{-e+,--exts=}'[Comma-separated list of file extensions to watch (js,css,html)]:extensions'
|
'(-e --exts)'{-e+,--exts=}'[Comma-separated list of file extensions to watch (js,css,html)]:extensions'
|
||||||
'(-f --filter)'{-f+,--filter=}'[Ignore all modifications except those matching the pattern]:pattern'
|
'(-f --filter)'{-f+,--filter=}'[Ignore all modifications except those matching the pattern]:pattern'
|
||||||
'(-i --ignore)'{-i+,--ignore=}'[Ignore modifications to paths matching the pattern]:pattern'
|
'(-i --ignore)'{-i+,--ignore=}'[Ignore modifications to paths matching the pattern]:pattern'
|
||||||
'(-w --watch)'{-w+,--watch=}'[Watch a specific directory]:path:_path_files -/'
|
'(-w --watch)'{-w+,--watch=}'[Watch a specific directory]:path:_path_files -/'
|
||||||
'(-s --signal)'{-s+,--signal=}'[Send signal to process upon changes, e.g. SIGHUP]:signal'
|
'(-s --signal)'{-s+,--signal=}'[Send signal to process upon changes, e.g. SIGHUP]:signal'
|
||||||
'--force-poll=[Forces polling mode]:interval'
|
'--force-poll=[Forces polling mode]:interval'
|
||||||
'--no-ignore[Skip auto-loading of ignore files (.gitignore, .ignore, etc.) for filtering]'
|
'--no-ignore[Skip auto-loading of ignore files (.gitignore, .ignore, etc.) for filtering]'
|
||||||
'--no-default-ignore[Skip auto-ignoring of commonly ignored globs]'
|
'--no-default-ignore[Skip auto-ignoring of commonly ignored globs]'
|
||||||
'--no-vcs-ignore[Skip auto-loading of .gitignore files for filtering]'
|
'--no-vcs-ignore[Skip auto-loading of .gitignore files for filtering]'
|
||||||
'(-)1:command: _command_names -e'
|
'(-)1:command: _command_names -e'
|
||||||
'*::arguments:{ _comp_priv_prefix=( $cmd -n ${(kv)opt_args[-u]} ) ; _normal }'
|
'*::arguments:{ _comp_priv_prefix=( $cmd -n ${(kv)opt_args[-u]} ) ; _normal }'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments -s -S $args
|
_arguments -s -S $args
|
||||||
|
|
Loading…
Reference in New Issue