Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

#48: Atomic files #50

Merged
merged 33 commits into from
Dec 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
39da22d
Define atomic operation
gwendalF Sep 30, 2023
86b7f60
Add testing and update writing/reading on the lib
gwendalF Sep 30, 2023
388e497
Simplify Link API with new folders
gwendalF Sep 30, 2023
4db73a5
Fix test by using a website which contains og:image, and fix load of …
gwendalF Sep 30, 2023
50023b4
Fix test with actual og:image and remove false, false
gwendalF Sep 30, 2023
6335210
Fix rebase issues
gwendalF Oct 2, 2023
22eeef7
Update with new constants and errors
gwendalF Oct 2, 2023
a259258
Format
gwendalF Oct 2, 2023
c4efaf6
Add test for simultenaous writings
gwendalF Oct 11, 2023
2c4b07b
Renaming Metadata into Properties, fixing typos
kirillt Oct 12, 2023
e97fe39
Convert meta.rs into prop.rs
kirillt Oct 12, 2023
4d0460a
Clippy and small updates
gwendalF Oct 13, 2023
dbb6a73
Add clippy on CI
gwendalF Oct 13, 2023
65fe267
Fix missing issue
gwendalF Oct 13, 2023
f8df8aa
Add machine id in filename
gwendalF Oct 16, 2023
471edf0
Fix error type for latest_version
gwendalF Oct 16, 2023
3372396
Fix prunning
gwendalF Oct 16, 2023
3f55dbd
Manage when multiples file same version
gwendalF Oct 17, 2023
c0cb7dd
Edit comment
gwendalF Oct 17, 2023
dc13dfe
Don't override properties
gwendalF Oct 18, 2023
3813b09
Comment reworded
kirillt Oct 19, 2023
963ca27
Comment reworded
kirillt Oct 19, 2023
67df6a3
Merge properties
GwendalFernet Oct 24, 2023
8b840af
Add test for merging, (fix when same value)
gwendalF Oct 27, 2023
4e47dd2
Clippy wants flatten
kirillt Nov 4, 2023
d07242e
Separate metadata module
kirillt Nov 4, 2023
f94f867
Fix Clippy findings
kirillt Nov 5, 2023
2a24a09
fix build script on macos or darwin
Rizary Nov 7, 2023
efe312f
Write url to temp file and rename to destination
gwendalF Nov 23, 2023
e0d4b95
Fix itertools use
gwendalF Nov 23, 2023
bf04bfe
Fix format
gwendalF Nov 23, 2023
236c5f8
Clippy fix
gwendalF Nov 23, 2023
9973e63
Minor enhancement
kirillt Nov 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
run: cargo check

- name: Format
run: cargo fmt --all -- --check
run: |
cargo fmt --all -- --check
cargo clippy

- name: Build Debug
run: cargo build --verbose
Expand Down
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@ tokio = { version = "1", features = ["full"] }
itertools = "0.10.5"
once_cell = "1.16.0"
thiserror = "1"
fastrand = "2"
machine-uid = "0.5.1"

[dev-dependencies]
tempdir = "0.3.7"
uuid = { version = "1.1.2", features = ["v4"] }
rstest = '0.18.2'

[build-dependencies]
flate2 = "1.0.24"
Expand All @@ -44,3 +47,4 @@ libloading = "0.7.3"
tar = "0.4.38"
target-lexicon = "0.12.4"
ureq = "2.4.0"
ring = "=0.17.5"
19 changes: 11 additions & 8 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fn main() {
let target = Triple::from_str(t.as_str()).unwrap();
let out_dir = env::var_os("OUT_DIR").unwrap();

println!("{}", target.operating_system);
// Avoid duplicate download
if !fs_extra::dir::ls(&out_dir, &HashSet::new())
.unwrap()
Expand Down Expand Up @@ -41,10 +42,11 @@ fn main() {
}
OperatingSystem::Ios => name.push("ios"),
OperatingSystem::MacOSX {
major: 11,
minor: 0,
patch: 0,
major: _,
minor: _,
patch: _,
} => name.push("mac"),
OperatingSystem::Darwin => name.push("mac"),
_ => {}
}

Expand All @@ -57,7 +59,7 @@ fn main() {
}
dbg!(&name);

let filename = name.join("-").to_string();
let filename = name.join("-");
let url = format!(
"https://github.com/bblanchon/pdfium-binaries/releases/download/chromium/{}/{}.tgz",
PDFIUM_VERSION, filename
Expand All @@ -81,10 +83,11 @@ fn main() {
.unwrap(),
OperatingSystem::Ios
| OperatingSystem::MacOSX {
major: 11,
minor: 0,
patch: 0,
} => fs_extra::file::move_file(
major: _,
minor: _,
patch: _,
}
| OperatingSystem::Darwin => fs_extra::file::move_file(
PathBuf::from(&out_dir)
.join("bin")
.join("libpdfium.dylib"),
Expand Down
Loading