mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-17 04:55:42 +09:00
feat(ci): publish build artifacts as GitHub releases (#1222)
This commit is contained in:
1 parent
31665225eb
commit
a2ed83df08
47 files changed
+1912
-403
No files matched your search
@@ -9,6 +9,7 @@ use crate::common::{
|
||||
runner_temp, s3_client, title_case, trim_option, upload_directory_to_s3,
|
||||
upload_directory_to_s3_overwrite,
|
||||
};
|
||||
use crate::functions::write_json_pretty;
|
||||
use anyhow::{Context, Result, anyhow, bail, ensure};
|
||||
use aws_sdk_s3::Client as S3Client;
|
||||
use chrono::{DateTime, Utc};
|
||||
@@ -3278,15 +3279,6 @@ fn sha256_file(path: &Path) -> Result<String> {
|
||||
Ok(hex::encode(hasher.finalize()))
|
||||
}
|
||||
|
||||
fn write_json_pretty<T: Serialize + ?Sized>(path: &Path, value: &T) -> Result<()> {
|
||||
if let Some(parent) = path.parent() {
|
||||
fs::create_dir_all(parent)
|
||||
.with_context(|| format!("Failed to create {}", parent.display()))?;
|
||||
}
|
||||
let bytes = serde_json::to_vec_pretty(value)?;
|
||||
fs::write(path, bytes).with_context(|| format!("Failed to write {}", path.display()))
|
||||
}
|
||||
|
||||
fn print_directory(dir: &Path) -> Result<()> {
|
||||
if !dir.exists() {
|
||||
println!("{} does not exist", dir.display());
|
||||
|
||||
Reference in new issue
Block a user