diff --git a/changes/pr-559.md b/changes/pr-559.md new file mode 100644 index 000000000..7d87c936a --- /dev/null +++ b/changes/pr-559.md @@ -0,0 +1 @@ +feat: bump sunnyside to 0.2.0 with bu/rs subcommands diff --git a/flake.lock b/flake.lock index 10a6f8f78..aa049e65a 100644 --- a/flake.lock +++ b/flake.lock @@ -938,11 +938,11 @@ "sunnyside": { "flake": false, "locked": { - "lastModified": 1717568445, - "narHash": "sha256-U2wiyKsJ6ACiajkfULpkdCUJ2/xZKQqNgzIHQL9utIE=", + "lastModified": 1782521357, + "narHash": "sha256-YBn5iN5xzxKxg4kjh2dbxkpG1v6i4AkHsG0ZO1kv+7Q=", "owner": "goromal", "repo": "sunnyside", - "rev": "d6605667490ce008321b32dea5732d7962609bf7", + "rev": "0da2719982d168969a9a793b85de9f6d8dd2e6f3", "type": "github" }, "original": { diff --git a/pkgs/rust-packages/sunnyside/default.nix b/pkgs/rust-packages/sunnyside/default.nix index d7fe2cd3d..5351a2322 100644 --- a/pkgs/rust-packages/sunnyside/default.nix +++ b/pkgs/rust-packages/sunnyside/default.nix @@ -5,9 +5,9 @@ }: rustPlatform.buildRustPackage rec { pname = "sunnyside"; - version = "0.1.1"; + version = "0.2.0"; src = pkg-src; - cargoHash = "sha256-iKjsrQ/u9SwQZNlSMPjJOxLRSbBuE21Ae0jnJ60fKoE="; + cargoHash = "sha256-aAzaj78FkeY7Q74AaKBhmGAm1b0WAeylBEg3vdwiWYc="; meta = { description = "File scrambler."; longDescription = '' diff --git a/test/test_sunnyside.sh b/test/test_sunnyside.sh index 5d27984d1..e961fd8f8 100644 --- a/test/test_sunnyside.sh +++ b/test/test_sunnyside.sh @@ -27,5 +27,20 @@ if [[ "$ccontent" != "SUCCESS" ]]; then exit 1 fi +make-title -c yellow "Testing sunnyside bu/rs (file)" +echo "BACKUP_TEST" > original.txt +sunnyside bu -t original.txt -s 4 -k u -d backup.tyz +[[ -f backup.tyz ]] || { echo_red "bu: dest not created"; exit 1; } +sunnyside rs -t backup.tyz -s 4 -k u -d restored.txt +[[ "$(cat restored.txt)" == "BACKUP_TEST" ]] || { echo_red "rs: file content mismatch"; exit 1; } + +make-title -c yellow "Testing sunnyside bu/rs (directory)" +mkdir -p testdir/sub +echo "NESTED" > testdir/sub/file.txt +sunnyside bu -t testdir -s 4 -k u -d dir_backup.tyz +[[ -f dir_backup.tyz ]] || { echo_red "bu: dir dest not created"; exit 1; } +sunnyside rs -t dir_backup.tyz -s 4 -k u -d testdir_restored +[[ "$(cat testdir_restored/sub/file.txt)" == "NESTED" ]] || { echo_red "rs: dir content mismatch"; exit 1; } + # Cleanup rm -rf "$tmpdir"