Compare commits

..

No commits in common. "main" and "0.1.8" have entirely different histories.
main ... 0.1.8

6 changed files with 31 additions and 76 deletions

View file

@ -9,31 +9,13 @@ 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: 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: Placeholder
run: echo Placeholder Job
-
name: Check if Version in Cargo.toml matches Tag
run: |
@ -46,10 +28,10 @@ jobs:
fi
build-linux:
needs: run-tests
needs: test
if: success()
runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
container: rust:latest
steps:
-
name: Storing Debian Codename for Package Upload Job
@ -57,33 +39,25 @@ 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
@ -141,7 +115,7 @@ jobs:
-
name: Load .env from build job
run: |
mv -v artifacts/build-env/build.env build.env
mv -v artifacts/build-env/build-env/build.env build.env
export $(xargs <build.env)
cat build.env
-

View file

@ -10,28 +10,7 @@ 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: 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: Placeholder
run: echo Placeholder Job

2
src-tauri/Cargo.lock generated
View file

@ -396,7 +396,7 @@ dependencies = [
[[package]]
name = "comicinfo-editor-v2"
version = "0.1.12"
version = "0.1.8"
dependencies = [
"quick-xml",
"serde",

View file

@ -1,6 +1,6 @@
[package]
name = "comicinfo-editor-v2"
version = "0.1.12"
version = "0.1.8"
description = "App for creating Comicinfo.xml files"
authors = ["Neshura"]
license = ""

View file

@ -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_all(&*buffer).unwrap();
zip_writer.write(&*buffer).unwrap();
}
zip_writer.finish().unwrap();

View file

@ -1,8 +1,10 @@
use std::{fs::File, io::{Write}};
use quick_xml::{se::Serializer};
use std::{fs::File, io::{Write, Cursor}};
use quick_xml::{se::Serializer, events::BytesStart};
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,
@ -137,7 +139,7 @@ impl Metadata {
ser.indent(' ', 4);
self.serialize(ser).unwrap();
file.write_all(buffer.as_bytes()).unwrap();
file.write(buffer.as_bytes()).unwrap();
}
}