Compare commits

..

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

6 changed files with 30 additions and 75 deletions

View file

@ -9,31 +9,13 @@ on:
jobs: jobs:
run-tests: run-tests:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
steps: steps:
-
name: Add Clippy
run: rustup component add clippy
- -
name: Checking Out Repository Code name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 uses: https://code.forgejo.org/actions/checkout@v3
- -
name: Change To Rust Root Dir name: Placeholder
run: cd src-tauri/ run: echo Placeholder Job
-
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 name: Check if Version in Cargo.toml matches Tag
run: | run: |
@ -46,10 +28,10 @@ jobs:
fi fi
build-linux: build-linux:
needs: run-tests needs: test
if: success() if: success()
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest container: rust:latest
steps: steps:
- -
name: Storing Debian Codename for Package Upload Job name: Storing Debian Codename for Package Upload Job
@ -57,33 +39,25 @@ jobs:
. /etc/os-release . /etc/os-release
echo Debian Codename is: $VERSION_CODENAME echo Debian Codename is: $VERSION_CODENAME
echo "DEBIAN_CODENAME=$VERSION_CODENAME" >> /build.env 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 name: Checking Out Repository Code
uses: https://code.forgejo.org/actions/checkout@v3 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 name: Install Yarn Packages
run: yarn install run: yarn install

View file

@ -10,28 +10,7 @@ on:
jobs: jobs:
run-tests: run-tests:
runs-on: docker runs-on: docker
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
steps: steps:
- -
name: Add Clippy name: Placeholder
run: rustup component add clippy run: echo Placeholder Job
-
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
View file

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

View file

@ -1,6 +1,6 @@
[package] [package]
name = "comicinfo-editor-v2" name = "comicinfo-editor-v2"
version = "0.1.12" version = "0.1.8"
description = "App for creating Comicinfo.xml files" description = "App for creating Comicinfo.xml files"
authors = ["Neshura"] authors = ["Neshura"]
license = "" 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(); file.read_to_end(&mut buffer).unwrap();
zip_writer.write_all(&*buffer).unwrap(); zip_writer.write(&*buffer).unwrap();
} }
zip_writer.finish().unwrap(); zip_writer.finish().unwrap();

View file

@ -1,8 +1,10 @@
use std::{fs::File, io::{Write}}; use std::{fs::File, io::{Write, Cursor}};
use quick_xml::{se::Serializer}; use quick_xml::{se::Serializer, events::BytesStart};
use serde::{Serialize, Deserialize}; use serde::{Serialize, Deserialize};
use serde::ser::{SerializeSeq, SerializeStruct}; use serde::ser::{SerializeSeq, SerializeStruct};
use serde_xml_rs::{to_string, to_writer};
#[derive(Debug, Deserialize, PartialEq, Clone)] #[derive(Debug, Deserialize, PartialEq, Clone)]
pub(crate) struct Metadata { pub(crate) struct Metadata {
pub(crate) title: String, pub(crate) title: String,
@ -137,7 +139,7 @@ impl Metadata {
ser.indent(' ', 4); ser.indent(' ', 4);
self.serialize(ser).unwrap(); self.serialize(ser).unwrap();
file.write_all(buffer.as_bytes()).unwrap(); file.write(buffer.as_bytes()).unwrap();
} }
} }