mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-05 02:55:31 +00:00
Merge branch 'main' into close-issue-466-727
This commit is contained in:
commit
590467d114
@ -3,7 +3,7 @@ name: Automatic trigger draft release
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "[0-9]+.[0-9]+.[0-9]+"
|
||||
- "[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
|
||||
|
||||
jobs:
|
||||
call-workflow-build-artifacts-and-run-tests:
|
||||
|
@ -18,13 +18,17 @@ Categories Used:
|
||||
|
||||
**Bullet points in chronological order by PR**
|
||||
|
||||
## [Unreleased](https://github.com/ouch-org/ouch/compare/0.6.0...HEAD)
|
||||
## [Unreleased](https://github.com/ouch-org/ouch/compare/0.6.1...HEAD)
|
||||
|
||||
### New Features
|
||||
### Improvements
|
||||
### Bug Fixes
|
||||
### Tweaks
|
||||
|
||||
## [0.6.1](https://github.com/ouch-org/ouch/compare/0.6.0...0.6.1)
|
||||
|
||||
- Fix .zip crash when file mode isn't present [\#804](https://github.com/ouch-org/ouch/pull/804) ([marcospb19](https://github.com/marcospb19))
|
||||
|
||||
## [0.6.0](https://github.com/ouch-org/ouch/compare/0.5.1...0.6.0)
|
||||
|
||||
### New Features
|
||||
|
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -1066,7 +1066,7 @@ checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e"
|
||||
|
||||
[[package]]
|
||||
name = "ouch"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"atty",
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ouch"
|
||||
version = "0.6.0"
|
||||
version = "0.6.1"
|
||||
authors = [
|
||||
"João Marcos <marcospb19@hotmail.com>",
|
||||
"Vinícius Rodrigues Miguel <vrmiguel99@gmail.com>",
|
||||
|
@ -8,7 +8,7 @@ cd downloaded_artifacts
|
||||
echo "entered 'downloaded_artifacts/'"
|
||||
ls -lA -w 1
|
||||
|
||||
TARGETS=(
|
||||
PLATFORMS=(
|
||||
"aarch64-pc-windows-msvc"
|
||||
"aarch64-unknown-linux-gnu"
|
||||
"aarch64-unknown-linux-musl"
|
||||
@ -20,42 +20,40 @@ TARGETS=(
|
||||
"x86_64-unknown-linux-gnu"
|
||||
"x86_64-unknown-linux-musl"
|
||||
)
|
||||
# Temporary, we'll remove allow_piped_choice later
|
||||
# TODO: remove allow_piped_choice later
|
||||
DEFAULT_FEATURES="allow_piped_choice+unrar+use_zlib+use_zstd_thin"
|
||||
|
||||
for target in "${TARGETS[@]}"; do
|
||||
input_dir="ouch-${target}-${DEFAULT_FEATURES}"
|
||||
for platform in "${PLATFORMS[@]}"; do
|
||||
path="ouch-${platform}"
|
||||
echo "Processing $path"
|
||||
|
||||
if [ ! -d "$input_dir" ]; then
|
||||
echo "ERROR: Could not find artifact directory for $target with default features ($input_dir)"
|
||||
if [ ! -d "${path}-${DEFAULT_FEATURES}" ]; then
|
||||
echo "ERROR: Could not find artifact directory for $platform with default features ($path)"
|
||||
exit 1
|
||||
fi
|
||||
mv "${path}-${DEFAULT_FEATURES}" "$path" # remove the annoying suffix
|
||||
|
||||
echo "Processing $input_dir"
|
||||
cp ../{README.md,LICENSE,CHANGELOG.md} "$path"
|
||||
mkdir -p "$path/man"
|
||||
mkdir -p "$path/completions"
|
||||
|
||||
cp ../{README.md,LICENSE,CHANGELOG.md} "$input_dir"
|
||||
mkdir -p "$input_dir/man"
|
||||
mkdir -p "$input_dir/completions"
|
||||
mv "$path"/man-page-and-completions-artifacts/*.1 "$path/man"
|
||||
mv "$path"/man-page-and-completions-artifacts/* "$path/completions"
|
||||
rm -r "$path/man-page-and-completions-artifacts"
|
||||
|
||||
mv "$input_dir"/man-page-and-completions-artifacts/*.1 "$input_dir/man"
|
||||
mv "$input_dir"/man-page-and-completions-artifacts/* "$input_dir/completions"
|
||||
rm -r "$input_dir/man-page-and-completions-artifacts"
|
||||
if [[ "$platform" == *"-windows-"* ]]; then
|
||||
mv "$path/target/$platform/release/ouch.exe" "$path"
|
||||
rm -rf "$path/target"
|
||||
|
||||
output_name="ouch-${target}"
|
||||
|
||||
if [[ "$target" == *"-windows-"* ]]; then
|
||||
mv "$input_dir/target/$target/release/ouch.exe" "$input_dir"
|
||||
rm -rf "$input_dir/target"
|
||||
|
||||
zip -r "../output_assets/${output_name}.zip" "$input_dir"
|
||||
echo "Created output_assets/${output_name}.zip"
|
||||
zip -r "../output_assets/${path}.zip" "$path"
|
||||
echo "Created output_assets/${path}.zip"
|
||||
else
|
||||
mv "$input_dir/target/$target/release/ouch" "$input_dir"
|
||||
rm -rf "$input_dir/target"
|
||||
chmod +x "$input_dir/ouch"
|
||||
mv "$path/target/$platform/release/ouch" "$path"
|
||||
rm -rf "$path/target"
|
||||
chmod +x "$path/ouch"
|
||||
|
||||
tar czf "../output_assets/${output_name}.tar.gz" "$input_dir"
|
||||
echo "Created output_assets/${output_name}.tar.gz"
|
||||
tar czf "../output_assets/${path}.tar.gz" "$path"
|
||||
echo "Created output_assets/${path}.tar.gz"
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -83,10 +83,8 @@ where
|
||||
));
|
||||
}
|
||||
|
||||
let mode = file.unix_mode().ok_or_else(|| {
|
||||
std::io::Error::new(std::io::ErrorKind::InvalidData, "Cannot extract file's mode")
|
||||
})?;
|
||||
let is_symlink = (mode & 0o170000) == 0o120000;
|
||||
let mode = file.unix_mode();
|
||||
let is_symlink = mode.is_some_and(|mode| mode & 0o170000 == 0o120000);
|
||||
|
||||
if is_symlink {
|
||||
let mut target = String::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user