Compare commits
16 commits
Author | SHA1 | Date | |
---|---|---|---|
eae08d44a6 | |||
42978587e3 | |||
1eaafac30d | |||
4abf3f239f | |||
ccab3c247b | |||
00099f8950 | |||
50cf8962e3 | |||
0b804f5bed | |||
f582b210d1 | |||
04b4f60279 | |||
80318dcbe5 | |||
1e688d4ea8 | |||
61849f8aee | |||
b4bd65e04b | |||
0a0dd33fb8 | |||
805c845481 |
6 changed files with 76 additions and 31 deletions
|
@ -9,13 +9,31 @@ 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: Placeholder
|
name: Change To Rust Root Dir
|
||||||
run: echo Placeholder Job
|
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
|
name: Check if Version in Cargo.toml matches Tag
|
||||||
run: |
|
run: |
|
||||||
|
@ -28,10 +46,10 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build-linux:
|
build-linux:
|
||||||
needs: test
|
needs: run-tests
|
||||||
if: success()
|
if: success()
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container: rust:latest
|
container: forgejo.neshweb.net/ci-docker-images/rust-tauri:latest
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Storing Debian Codename for Package Upload Job
|
name: Storing Debian Codename for Package Upload Job
|
||||||
|
@ -39,25 +57,33 @@ 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
|
||||||
|
@ -115,7 +141,7 @@ jobs:
|
||||||
-
|
-
|
||||||
name: Load .env from build job
|
name: Load .env from build job
|
||||||
run: |
|
run: |
|
||||||
mv -v artifacts/build-env/build-env/build.env build.env
|
mv -v artifacts/build-env/build.env build.env
|
||||||
export $(xargs <build.env)
|
export $(xargs <build.env)
|
||||||
cat build.env
|
cat build.env
|
||||||
-
|
-
|
||||||
|
|
|
@ -10,7 +10,28 @@ 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: Placeholder
|
name: Add Clippy
|
||||||
run: echo Placeholder Job
|
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]]
|
[[package]]
|
||||||
name = "comicinfo-editor-v2"
|
name = "comicinfo-editor-v2"
|
||||||
version = "0.1.8"
|
version = "0.1.12"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quick-xml",
|
"quick-xml",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "comicinfo-editor-v2"
|
name = "comicinfo-editor-v2"
|
||||||
version = "0.1.8"
|
version = "0.1.12"
|
||||||
description = "App for creating Comicinfo.xml files"
|
description = "App for creating Comicinfo.xml files"
|
||||||
authors = ["Neshura"]
|
authors = ["Neshura"]
|
||||||
license = ""
|
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();
|
file.read_to_end(&mut buffer).unwrap();
|
||||||
|
|
||||||
zip_writer.write(&*buffer).unwrap();
|
zip_writer.write_all(&*buffer).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
zip_writer.finish().unwrap();
|
zip_writer.finish().unwrap();
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
use std::{fs::File, io::{Write, Cursor}};
|
use std::{fs::File, io::{Write}};
|
||||||
use quick_xml::{se::Serializer, events::BytesStart};
|
use quick_xml::{se::Serializer};
|
||||||
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,
|
||||||
|
@ -139,7 +137,7 @@ impl Metadata {
|
||||||
ser.indent(' ', 4);
|
ser.indent(' ', 4);
|
||||||
|
|
||||||
self.serialize(ser).unwrap();
|
self.serialize(ser).unwrap();
|
||||||
file.write(buffer.as_bytes()).unwrap();
|
file.write_all(buffer.as_bytes()).unwrap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue