From ab5dd00b86bb96f6898f336e1a3bddf15791c349 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos?= Date: Fri, 18 Apr 2025 03:20:31 -0300 Subject: [PATCH 1/3] Fix release CI (#797) --- .github/workflows/all-tests-slow.yml | 2 +- .../build-artifacts-and-run-tests.yml | 34 ++++++---- .../draft-release-automatic-trigger.yml | 8 ++- .../draft-release-manual-trigger.yml | 32 --------- .github/workflows/pr-workflow.yml | 2 +- Cargo.toml | 4 +- build.rs | 10 +-- scripts/package-release-assets.sh | 67 +++++++++++++------ 8 files changed, 81 insertions(+), 78 deletions(-) delete mode 100644 .github/workflows/draft-release-manual-trigger.yml diff --git a/.github/workflows/all-tests-slow.yml b/.github/workflows/all-tests-slow.yml index 7d090ac..dbf90cf 100644 --- a/.github/workflows/all-tests-slow.yml +++ b/.github/workflows/all-tests-slow.yml @@ -14,4 +14,4 @@ jobs: uses: ./.github/workflows/build-artifacts-and-run-tests.yml with: matrix_all_combinations: true - upload_artifacts: false + artifact_upload_mode: none diff --git a/.github/workflows/build-artifacts-and-run-tests.yml b/.github/workflows/build-artifacts-and-run-tests.yml index 39df8af..5a851f7 100644 --- a/.github/workflows/build-artifacts-and-run-tests.yml +++ b/.github/workflows/build-artifacts-and-run-tests.yml @@ -10,20 +10,23 @@ on: type: boolean required: true default: true - upload_artifacts: - description: "if built artifacts should be uploaded" - type: boolean + artifact_upload_mode: + description: "Control what artifacts to upload: 'none' for no uploads, 'with_default_features' to upload artifacts with default features (for releases), or 'all' for all feature combinations." + type: choice + options: + - none + - with_default_features + - all required: true - default: true workflow_call: inputs: matrix_all_combinations: description: "if matrix should have all combinations of targets and features" type: boolean required: true - upload_artifacts: - description: "if built artifacts should be uploaded" - type: boolean + artifact_upload_mode: + description: "Control which artifacts to upload: 'none' for no uploads, 'with_default_features' to upload only artifacts with default features (use_zlib+use_zstd_thin+unrar), or 'all' to upload all feature combinations." + type: string required: true jobs: @@ -102,12 +105,16 @@ jobs: if [[ "${{ matrix.feature-use-zlib }}" == true ]]; then FEATURES+=(use_zlib); fi if [[ "${{ matrix.feature-use-zstd-thin }}" == true ]]; then FEATURES+=(use_zstd_thin); fi if [[ "${{ matrix.feature-unrar }}" == true ]]; then FEATURES+=(unrar); fi + # Output plus-separated list for artifact names + IFS='+' + echo "FEATURES_PLUS=${FEATURES[*]}" >> $GITHUB_OUTPUT + # Output comma-separated list for cargo flags IFS=',' - echo "FEATURES=${FEATURES[*]}" >> $GITHUB_OUTPUT + echo "FEATURES_COMMA=${FEATURES[*]}" >> $GITHUB_OUTPUT - name: Set up extra cargo flags env: - FEATURES: ${{steps.concat-features.outputs.FEATURES}} + FEATURES: ${{steps.concat-features.outputs.FEATURES_COMMA}} shell: bash run: | FLAGS="--no-default-features" @@ -133,13 +140,16 @@ jobs: run: | ${{ env.CARGO }} +stable build --release --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS env: - OUCH_ARTIFACTS_FOLDER: artifacts + OUCH_ARTIFACTS_FOLDER: man-page-and-completions-artifacts - name: Upload release artifacts - if: ${{ inputs.upload_artifacts }} + if: | + ${{ inputs.artifact_upload_mode != 'none' && + (inputs.artifact_upload_mode == 'all' || + (matrix.feature-unrar && matrix.feature-use-zlib && matrix.feature-use-zstd-thin)) }} uses: actions/upload-artifact@v4 with: - name: ouch-${{ matrix.target }}-${{ steps.concat-features.outputs.FEATURES }} + name: ouch-${{ matrix.target }}${{ steps.concat-features.outputs.FEATURES_PLUS != '' && format('-{0}', steps.concat-features.outputs.FEATURES_PLUS) || '' }} path: | target/${{ matrix.target }}/release/ouch target/${{ matrix.target }}/release/ouch.exe diff --git a/.github/workflows/draft-release-automatic-trigger.yml b/.github/workflows/draft-release-automatic-trigger.yml index affcac7..fd45837 100644 --- a/.github/workflows/draft-release-automatic-trigger.yml +++ b/.github/workflows/draft-release-automatic-trigger.yml @@ -10,7 +10,7 @@ jobs: uses: ./.github/workflows/build-artifacts-and-run-tests.yml with: matrix_all_combinations: true - upload_artifacts: true + artifact_upload_mode: with_default_features automated-draft-release: runs-on: ubuntu-latest @@ -23,7 +23,9 @@ jobs: - name: Download artifacts uses: dawidd6/action-download-artifact@v6 with: - path: artifacts + path: downloaded_artifacts + workflow: ./.github/workflows/build-artifacts-and-run-tests.yml + name: ouch-* - name: Package release assets run: scripts/package-release-assets.sh @@ -32,4 +34,4 @@ jobs: uses: softprops/action-gh-release@v2 with: draft: true - files: release/ouch-* + files: output_assets/ouch-* diff --git a/.github/workflows/draft-release-manual-trigger.yml b/.github/workflows/draft-release-manual-trigger.yml deleted file mode 100644 index f4e3014..0000000 --- a/.github/workflows/draft-release-manual-trigger.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: Manual trigger draft release - -on: - workflow_dispatch: - inputs: - run_id: - description: Run id of the action run to pull artifacts from - required: true - -jobs: - create-draft-release-from-manual-trigger: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Download artifacts - uses: dawidd6/action-download-artifact@v6 - with: - path: artifacts - workflow: build-artifacts-and-run-tests.yml - run_id: ${{ github.event.inputs.run_id }} - - - name: Package release assets - run: scripts/package-release-assets.sh - - - name: Create release - uses: softprops/action-gh-release@v2 - with: - draft: true - name: manual release ${{ github.event.inputs.run_id }} - files: release/ouch-* diff --git a/.github/workflows/pr-workflow.yml b/.github/workflows/pr-workflow.yml index e804c0c..6ef3cfd 100644 --- a/.github/workflows/pr-workflow.yml +++ b/.github/workflows/pr-workflow.yml @@ -32,4 +32,4 @@ jobs: uses: ./.github/workflows/build-artifacts-and-run-tests.yml with: matrix_all_combinations: false - upload_artifacts: false + artifact_upload_mode: none diff --git a/Cargo.toml b/Cargo.toml index 6ce7258..309d28e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "ouch" version = "0.5.1" authors = [ - "João M. Bezerra ", + "João Marcos ", "Vinícius Rodrigues Miguel ", ] edition = "2021" @@ -70,7 +70,7 @@ regex = "1.10.4" test-strategy = "0.4.0" [features] -default = ["use_zlib", "use_zstd_thin", "unrar"] +default = ["unrar", "use_zlib", "use_zstd_thin"] use_zlib = ["flate2/zlib", "gzp/deflate_zlib", "zip/deflate-zlib"] use_zstd_thin = ["zstd/thin"] allow_piped_choice = [] diff --git a/build.rs b/build.rs index c7a1f91..c023757 100644 --- a/build.rs +++ b/build.rs @@ -5,18 +5,12 @@ /// Set `OUCH_ARTIFACTS_FOLDER` to the name of the destination folder: /// /// ```sh -/// OUCH_ARTIFACTS_FOLDER=my-folder cargo build +/// OUCH_ARTIFACTS_FOLDER=man-page-and-completions-artifacts cargo build /// ``` /// -/// All completion files will be generated inside of the folder "my-folder". +/// All completion files will be generated inside of the folder "man-page-and-completions-artifacts". /// /// If the folder does not exist, it will be created. -/// -/// We recommend you naming this folder "artifacts" for the sake of consistency. -/// -/// ```sh -/// OUCH_ARTIFACTS_FOLDER=artifacts cargo build -/// ``` use std::{ env, fs::{create_dir_all, File}, diff --git a/scripts/package-release-assets.sh b/scripts/package-release-assets.sh index c2e1ba9..69aac6f 100755 --- a/scripts/package-release-assets.sh +++ b/scripts/package-release-assets.sh @@ -1,28 +1,57 @@ #!/usr/bin/env bash - set -e -mkdir release -cd artifacts +mkdir -p output_assets +cd downloaded_artifacts -for dir in ouch-*; do - cp -r "$dir/artifacts" "$dir/completions" - mkdir "$dir/man" - mv "$dir"/completions/*.1 "$dir/man" +TARGETS=( + "aarch64-pc-windows-msvc" + "aarch64-unknown-linux-gnu" + "aarch64-unknown-linux-musl" + "armv7-unknown-linux-gnueabihf" + "armv7-unknown-linux-musleabihf" + "x86_64-apple-darwin" + "x86_64-pc-windows-gnu" + "x86_64-pc-windows-msvc" + "x86_64-unknown-linux-gnu" + "x86_64-unknown-linux-musl" +) +DEFAULT_FEATURES="unrar+use_zlib+use_zstd_thin" - cp ../{README.md,LICENSE,CHANGELOG.md} "$dir" - rm -r "$dir/artifacts" +for target in "${TARGETS[@]}"; do + input_dir="ouch-${target}-${DEFAULT_FEATURES}" - if [[ "$dir" = *.exe ]]; then - target=${dir%.exe} - mv "$dir/target/${target/ouch-/}/release/ouch.exe" "$dir" - rm -r "$dir/target" - mv "$dir" "$target" - zip -r "../release/$target.zip" "$target" + if [ ! -d "$input_dir" ]; then + echo "ERROR: Could not find artifact directory for $target with default features ($input_dir)" + exit 1 + fi + + echo "Processing $input_dir" + + cp ../{README.md,LICENSE,CHANGELOG.md} "$input_dir" + mkdir -p "$input_dir/man" + mkdir -p "$input_dir/completions" + + 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" + + 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" else - mv "$dir/target/${dir/ouch-/}/release/ouch" "$dir" - rm -r "$dir/target" - chmod +x "$dir/ouch" - tar czf "../release/$dir.tar.gz" "$dir" + mv "$input_dir/target/$target/release/ouch" "$input_dir" + rm -rf "$input_dir/target" + chmod +x "$input_dir/ouch" + + tar czf "../output_assets/${output_name}.tar.gz" "$input_dir" + echo "Created output_assets/${output_name}.tar.gz" fi done + +echo "Done." From 4961a2c4788e41c443c93070f6e445ad476cd162 Mon Sep 17 00:00:00 2001 From: Talison Fabio <54823205+talis-fb@users.noreply.github.com> Date: Fri, 18 Apr 2025 12:24:02 -0300 Subject: [PATCH 2/3] tweak: Align file sizes at left to make output clearer (#792) --- CHANGELOG.md | 1 + src/archive/rar.rs | 6 +-- src/archive/sevenz.rs | 4 +- src/archive/tar.rs | 4 +- src/archive/zip.rs | 4 +- src/utils/formatting.rs | 40 +++++++++---------- ..._ui_test_ok_decompress_multiple_files.snap | 13 ++++++ tests/ui.rs | 25 +++++++++++- 8 files changed, 67 insertions(+), 30 deletions(-) create mode 100644 tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap diff --git a/CHANGELOG.md b/CHANGELOG.md index f295155..7de9463 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ Categories Used: - Make `--format` more forgiving with the formatting of the provided format [\#519](https://github.com/ouch-org/ouch/pull/519) ([marcospb19](https://github.com/marcospb19)) - Use buffered writer for list output [\#764](https://github.com/ouch-org/ouch/pull/764) ([killercup](https://github.com/killercup)) - Disable smart unpack when `--dir` flag is provided in decompress command [\#782](https://github.com/ouch-org/ouch/pull/782) ([talis-fb](https://github.com/talis-fb)) +- Align file sizes at left for each extracted file to make output clearer [\#792](https://github.com/ouch-org/ouch/pull/792) ([talis-fb](https://github.com/talis-fb)) ## [0.5.1](https://github.com/ouch-org/ouch/compare/0.5.0...0.5.1) diff --git a/src/archive/rar.rs b/src/archive/rar.rs index ec2d1e6..37894a0 100644 --- a/src/archive/rar.rs +++ b/src/archive/rar.rs @@ -7,7 +7,7 @@ use unrar::Archive; use crate::{ error::{Error, Result}, list::FileInArchive, - utils::logger::info, + utils::{logger::info, Bytes}, }; /// Unpacks the archive given by `archive_path` into the folder given by `output_folder`. @@ -33,9 +33,9 @@ pub fn unpack_archive( archive = if entry.is_file() { if !quiet { info(format!( - "{} extracted. ({})", + "extracted ({}) {}", + Bytes::new(entry.unpacked_size), entry.filename.display(), - entry.unpacked_size )); } unpacked += 1; diff --git a/src/archive/sevenz.rs b/src/archive/sevenz.rs index 7c14f0e..2618209 100644 --- a/src/archive/sevenz.rs +++ b/src/archive/sevenz.rs @@ -127,9 +127,9 @@ where } else { if !quiet { info(format!( - "{:?} extracted. ({})", + "extracted ({}) {:?}", + Bytes::new(entry.size()), file_path.display(), - Bytes::new(entry.size()) )); } diff --git a/src/archive/tar.rs b/src/archive/tar.rs index c0d962d..513d36c 100644 --- a/src/archive/tar.rs +++ b/src/archive/tar.rs @@ -56,9 +56,9 @@ pub fn unpack_archive(reader: Box, output_folder: &Path, quiet: bool) // and so on if !quiet { info(format!( - "{:?} extracted. ({})", - utils::strip_cur_dir(&output_folder.join(file.path()?)), + "extracted ({}) {:?}", Bytes::new(file.size()), + utils::strip_cur_dir(&output_folder.join(file.path()?)), )); files_unpacked += 1; diff --git a/src/archive/zip.rs b/src/archive/zip.rs index d593477..55de2f4 100644 --- a/src/archive/zip.rs +++ b/src/archive/zip.rs @@ -79,9 +79,9 @@ where // same reason is in _is_dir: long, often not needed text if !quiet { info(format!( - "{:?} extracted. ({})", + "extracted ({}) {:?}", + Bytes::new(file.size()), file_path.display(), - Bytes::new(file.size()) )); } diff --git a/src/utils/formatting.rs b/src/utils/formatting.rs index 9ebef96..3b82a09 100644 --- a/src/utils/formatting.rs +++ b/src/utils/formatting.rs @@ -105,11 +105,11 @@ impl Bytes { impl std::fmt::Display for Bytes { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let &Self(num) = self; + let num = self.0; debug_assert!(num >= 0.0); if num < 1_f64 { - return write!(f, "{} B", num); + return write!(f, "{:>6.2} B", num); } let delimiter = 1000_f64; @@ -117,9 +117,9 @@ impl std::fmt::Display for Bytes { write!( f, - "{:.2} {}B", + "{:>6.2} {:>2}B", num / delimiter.powi(exponent), - Bytes::UNIT_PREFIXES[exponent as usize] + Bytes::UNIT_PREFIXES[exponent as usize], ) } } @@ -138,33 +138,33 @@ mod tests { let mb = kb * 1000; let gb = mb * 1000; - assert_eq!("0 B", format_bytes(0)); // This is weird - assert_eq!("1.00 B", format_bytes(b)); - assert_eq!("999.00 B", format_bytes(b * 999)); - assert_eq!("12.00 MiB", format_bytes(mb * 12)); + assert_eq!(" 0.00 B", format_bytes(0)); // This is weird + assert_eq!(" 1.00 B", format_bytes(b)); + assert_eq!("999.00 B", format_bytes(b * 999)); + assert_eq!(" 12.00 MiB", format_bytes(mb * 12)); assert_eq!("123.00 MiB", format_bytes(mb * 123)); - assert_eq!("5.50 MiB", format_bytes(mb * 5 + kb * 500)); - assert_eq!("7.54 GiB", format_bytes(gb * 7 + 540 * mb)); - assert_eq!("1.20 TiB", format_bytes(gb * 1200)); + assert_eq!(" 5.50 MiB", format_bytes(mb * 5 + kb * 500)); + assert_eq!(" 7.54 GiB", format_bytes(gb * 7 + 540 * mb)); + assert_eq!(" 1.20 TiB", format_bytes(gb * 1200)); // bytes - assert_eq!("234.00 B", format_bytes(234)); - assert_eq!("999.00 B", format_bytes(999)); + assert_eq!("234.00 B", format_bytes(234)); + assert_eq!("999.00 B", format_bytes(999)); // kilobytes - assert_eq!("2.23 kiB", format_bytes(2234)); - assert_eq!("62.50 kiB", format_bytes(62500)); + assert_eq!(" 2.23 kiB", format_bytes(2234)); + assert_eq!(" 62.50 kiB", format_bytes(62500)); assert_eq!("329.99 kiB", format_bytes(329990)); // megabytes - assert_eq!("2.75 MiB", format_bytes(2750000)); - assert_eq!("55.00 MiB", format_bytes(55000000)); + assert_eq!(" 2.75 MiB", format_bytes(2750000)); + assert_eq!(" 55.00 MiB", format_bytes(55000000)); assert_eq!("987.65 MiB", format_bytes(987654321)); // gigabytes - assert_eq!("5.28 GiB", format_bytes(5280000000)); - assert_eq!("95.20 GiB", format_bytes(95200000000)); + assert_eq!(" 5.28 GiB", format_bytes(5280000000)); + assert_eq!(" 95.20 GiB", format_bytes(95200000000)); assert_eq!("302.00 GiB", format_bytes(302000000000)); assert_eq!("302.99 GiB", format_bytes(302990000000)); // Weird aproximation cases: assert_eq!("999.90 GiB", format_bytes(999900000000)); - assert_eq!("1.00 TiB", format_bytes(999990000000)); + assert_eq!(" 1.00 TiB", format_bytes(999990000000)); } } diff --git a/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap b/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap new file mode 100644 index 0000000..4240b95 --- /dev/null +++ b/tests/snapshots/ui__ui_test_ok_decompress_multiple_files.snap @@ -0,0 +1,13 @@ +--- +source: tests/ui.rs +expression: stdout_lines +--- +{ + "", + "[INFO] Files unpacked: 4", + "[INFO] Successfully decompressed archive in /outputs", + "[INFO] extracted ( 0.00 B) \"outputs/inputs\"", + "[INFO] extracted ( 0.00 B) \"outputs/inputs/input\"", + "[INFO] extracted ( 0.00 B) \"outputs/inputs/input2\"", + "[INFO] extracted ( 0.00 B) \"outputs/inputs/input3\"", +} diff --git a/tests/ui.rs b/tests/ui.rs index e9d3508..9492d1a 100644 --- a/tests/ui.rs +++ b/tests/ui.rs @@ -6,7 +6,7 @@ #[macro_use] mod utils; -use std::{ffi::OsStr, io, path::Path, process::Output}; +use std::{collections::BTreeSet, ffi::OsStr, io, path::Path, process::Output}; use insta::assert_snapshot as ui; use regex::Regex; @@ -142,6 +142,29 @@ fn ui_test_ok_decompress() { ui!(run_ouch("ouch decompress output.zst", dir)); } +#[cfg(target_os = "linux")] +#[test] +fn ui_test_ok_decompress_multiple_files() { + let (_dropper, dir) = testdir().unwrap(); + + let inputs_dir = dir.join("inputs"); + std::fs::create_dir(&inputs_dir).unwrap(); + + let outputs_dir = dir.join("outputs"); + std::fs::create_dir(&outputs_dir).unwrap(); + + // prepare + create_files_in(&inputs_dir, &["input", "input2", "input3"]); + + let compress_command = format!("ouch compress {} output.tar.zst", inputs_dir.to_str().unwrap()); + run_ouch(&compress_command, dir); + + let decompress_command = format!("ouch decompress output.tar.zst --dir {}", outputs_dir.to_str().unwrap()); + let stdout = run_ouch(&decompress_command, dir); + let stdout_lines = stdout.split('\n').collect::>(); + insta::assert_debug_snapshot!(stdout_lines); +} + #[test] fn ui_test_usage_help_flag() { insta::with_settings!({filters => vec![ From 739dfa9507d4c0d913e5b0203da0cecb4ce58bdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marcos?= Date: Fri, 18 Apr 2025 03:46:39 -0300 Subject: [PATCH 3/3] Bump version to 0.6.0 --- .github/workflows/build-artifacts-and-run-tests.yml | 8 ++++---- .github/workflows/draft-release-automatic-trigger.yml | 5 ++--- CHANGELOG.md | 9 ++++++++- Cargo.lock | 2 +- Cargo.toml | 2 +- scripts/package-release-assets.sh | 9 +++++++-- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-artifacts-and-run-tests.yml b/.github/workflows/build-artifacts-and-run-tests.yml index 5a851f7..3b84f9d 100644 --- a/.github/workflows/build-artifacts-and-run-tests.yml +++ b/.github/workflows/build-artifacts-and-run-tests.yml @@ -102,9 +102,9 @@ jobs: shell: bash run: | FEATURES=(allow_piped_choice) + if [[ "${{ matrix.feature-unrar }}" == true ]]; then FEATURES+=(unrar); fi if [[ "${{ matrix.feature-use-zlib }}" == true ]]; then FEATURES+=(use_zlib); fi if [[ "${{ matrix.feature-use-zstd-thin }}" == true ]]; then FEATURES+=(use_zstd_thin); fi - if [[ "${{ matrix.feature-unrar }}" == true ]]; then FEATURES+=(unrar); fi # Output plus-separated list for artifact names IFS='+' echo "FEATURES_PLUS=${FEATURES[*]}" >> $GITHUB_OUTPUT @@ -127,7 +127,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - key: "${{ matrix.target }}-${{ matrix.feature-unrar }}-${{ matrix.feature-use-zstd-thin }}-${{ matrix.feature-unrar }}" + key: "${{ matrix.target }}-${{ matrix.feature-unrar }}-${{ matrix.feature-use-zlib }}-${{ matrix.feature-use-zstd-thin }}" - name: Test on stable # there's no way to run tests for ARM64 Windows for now @@ -136,7 +136,7 @@ jobs: ${{ env.CARGO }} +stable test --profile fast --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS - name: Build release artifacts (binary and completions) - if: ${{ inputs.upload_artifacts }} + if: ${{ inputs.artifact_upload_mode != 'none' }} run: | ${{ env.CARGO }} +stable build --release --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS env: @@ -153,4 +153,4 @@ jobs: path: | target/${{ matrix.target }}/release/ouch target/${{ matrix.target }}/release/ouch.exe - artifacts/ + man-page-and-completions-artifacts/ diff --git a/.github/workflows/draft-release-automatic-trigger.yml b/.github/workflows/draft-release-automatic-trigger.yml index fd45837..24b45fc 100644 --- a/.github/workflows/draft-release-automatic-trigger.yml +++ b/.github/workflows/draft-release-automatic-trigger.yml @@ -21,11 +21,10 @@ jobs: uses: actions/checkout@v4 - name: Download artifacts - uses: dawidd6/action-download-artifact@v6 + uses: actions/download-artifact@v4 with: path: downloaded_artifacts - workflow: ./.github/workflows/build-artifacts-and-run-tests.yml - name: ouch-* + pattern: ouch-* - name: Package release assets run: scripts/package-release-assets.sh diff --git a/CHANGELOG.md b/CHANGELOG.md index 7de9463..dd50ea8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,14 @@ Categories Used: **Bullet points in chronological order by PR** -## [Unreleased](https://github.com/ouch-org/ouch/compare/0.5.1...HEAD) +## [Unreleased](https://github.com/ouch-org/ouch/compare/0.6.0...HEAD) + +### New Features +### Improvements +### Bug Fixes +### Tweaks + +## [0.6.0](https://github.com/ouch-org/ouch/compare/0.5.1...0.6.0) ### New Features diff --git a/Cargo.lock b/Cargo.lock index f87245c..59bd16a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1066,7 +1066,7 @@ checksum = "945462a4b81e43c4e3ba96bd7b49d834c6f61198356aa858733bc4acf3cbe62e" [[package]] name = "ouch" -version = "0.5.1" +version = "0.6.0" dependencies = [ "assert_cmd", "atty", diff --git a/Cargo.toml b/Cargo.toml index 309d28e..1fe8b82 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ouch" -version = "0.5.1" +version = "0.6.0" authors = [ "João Marcos ", "Vinícius Rodrigues Miguel ", diff --git a/scripts/package-release-assets.sh b/scripts/package-release-assets.sh index 69aac6f..84d635e 100755 --- a/scripts/package-release-assets.sh +++ b/scripts/package-release-assets.sh @@ -1,8 +1,12 @@ #!/usr/bin/env bash set -e -mkdir -p output_assets +mkdir output_assets +echo "created folder 'output_assets/'" +ls -lA -w 1 cd downloaded_artifacts +echo "entered 'downloaded_artifacts/'" +ls -lA -w 1 TARGETS=( "aarch64-pc-windows-msvc" @@ -16,7 +20,8 @@ TARGETS=( "x86_64-unknown-linux-gnu" "x86_64-unknown-linux-musl" ) -DEFAULT_FEATURES="unrar+use_zlib+use_zstd_thin" +# Temporary, we'll 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}"