Compare commits
15 commits
Author | SHA1 | Date | |
---|---|---|---|
eae08d44a6 | |||
42978587e3 | |||
1eaafac30d | |||
4abf3f239f | |||
ccab3c247b | |||
00099f8950 | |||
50cf8962e3 | |||
0b804f5bed | |||
f582b210d1 | |||
04b4f60279 | |||
80318dcbe5 | |||
1e688d4ea8 | |||
61849f8aee | |||
b4bd65e04b | |||
0a0dd33fb8 |
6 changed files with 75 additions and 30 deletions
|
@ -9,13 +9,31 @@ on:
|
|||
jobs:
|
||||
run-tests:
|
||||
runs-on: docker
|
||||
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
|
||||
steps:
|
||||
-
|
||||
name: Add Clippy
|
||||
run: rustup component add clippy
|
||||
-
|
||||
name: Checking Out Repository Code
|
||||
uses: https://code.forgejo.org/actions/checkout@v3
|
||||
-
|
||||
name: Placeholder
|
||||
run: echo Placeholder Job
|
||||
name: Change To Rust Root Dir
|
||||
run: cd src-tauri/
|
||||
-
|
||||
name: Set Up Cargo Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
-
|
||||
name: Run Clippy
|
||||
run: cargo clippy --manifest-path **/Cargo.toml
|
||||
-
|
||||
name: Check if Version in Cargo.toml matches Tag
|
||||
run: |
|
||||
|
@ -28,10 +46,10 @@ jobs:
|
|||
fi
|
||||
|
||||
build-linux:
|
||||
needs: test
|
||||
needs: run-tests
|
||||
if: success()
|
||||
runs-on: docker
|
||||
container: rust:latest
|
||||
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
|
||||
steps:
|
||||
-
|
||||
name: Storing Debian Codename for Package Upload Job
|
||||
|
@ -39,25 +57,33 @@ jobs:
|
|||
. /etc/os-release
|
||||
echo Debian Codename is: $VERSION_CODENAME
|
||||
echo "DEBIAN_CODENAME=$VERSION_CODENAME" >> /build.env
|
||||
-
|
||||
name: Installing Node, NPM
|
||||
run: |
|
||||
apt update
|
||||
apt install -y \
|
||||
nodejs npm \
|
||||
libwebkit2gtk-4.0-dev \
|
||||
build-essential \
|
||||
libgtk-3-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
-
|
||||
name: Installing Yarn, Vite
|
||||
run: npm install --global yarn vite
|
||||
-
|
||||
name: Installing Tauri CLI
|
||||
run: cargo install tauri-cli
|
||||
-
|
||||
name: Checking Out Repository Code
|
||||
uses: https://code.forgejo.org/actions/checkout@v3
|
||||
-
|
||||
name: Set Up Cargo Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/**/Cargo.lock') }}
|
||||
-
|
||||
name: Get Yarn Cache Directory
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
-
|
||||
name: Set Up Yarn Cache
|
||||
uses: actions/cache@v3
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
-
|
||||
name: Install Yarn Packages
|
||||
run: yarn install
|
||||
|
|
|
@ -10,7 +10,28 @@ on:
|
|||
jobs:
|
||||
run-tests:
|
||||
runs-on: docker
|
||||
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
|
||||
steps:
|
||||
-
|
||||
name: Placeholder
|
||||
run: echo Placeholder Job
|
||||
name: Add Clippy
|
||||
run: rustup component add clippy
|
||||
-
|
||||
name: Checking Out Repository Code
|
||||
uses: https://code.forgejo.org/actions/checkout@v3
|
||||
-
|
||||
name: Change To Rust Root Dir
|
||||
run: cd src-tauri/
|
||||
-
|
||||
name: Set Up Cargo Cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
target/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
-
|
||||
name: Run Clippy
|
||||
run: cargo clippy --manifest-path **/Cargo.toml
|
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
|
@ -396,7 +396,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "comicinfo-editor-v2"
|
||||
version = "0.1.8"
|
||||
version = "0.1.12"
|
||||
dependencies = [
|
||||
"quick-xml",
|
||||
"serde",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "comicinfo-editor-v2"
|
||||
version = "0.1.8"
|
||||
version = "0.1.12"
|
||||
description = "App for creating Comicinfo.xml files"
|
||||
authors = ["Neshura"]
|
||||
license = ""
|
||||
|
|
|
@ -57,7 +57,7 @@ fn save_bundle(bundle_dir: String, metadata_file_path: String, save_path: String
|
|||
|
||||
file.read_to_end(&mut buffer).unwrap();
|
||||
|
||||
zip_writer.write(&*buffer).unwrap();
|
||||
zip_writer.write_all(&*buffer).unwrap();
|
||||
}
|
||||
|
||||
zip_writer.finish().unwrap();
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
use std::{fs::File, io::{Write, Cursor}};
|
||||
use quick_xml::{se::Serializer, events::BytesStart};
|
||||
use std::{fs::File, io::{Write}};
|
||||
use quick_xml::{se::Serializer};
|
||||
use serde::{Serialize, Deserialize};
|
||||
use serde::ser::{SerializeSeq, SerializeStruct};
|
||||
|
||||
use serde_xml_rs::{to_string, to_writer};
|
||||
|
||||
#[derive(Debug, Deserialize, PartialEq, Clone)]
|
||||
pub(crate) struct Metadata {
|
||||
pub(crate) title: String,
|
||||
|
@ -139,7 +137,7 @@ impl Metadata {
|
|||
ser.indent(' ', 4);
|
||||
|
||||
self.serialize(ser).unwrap();
|
||||
file.write(buffer.as_bytes()).unwrap();
|
||||
file.write_all(buffer.as_bytes()).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue