mirror of
https://github.com/sebastiandine/Card-Collection-Manager-2.git
synced 2026-08-29 01:08:49 +00:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1346db06a6 | |||
| 01e9436a42 | |||
| 2f967a1626 | |||
| f03167a531 | |||
| 7be5f51376 | |||
| 0ce9b09979 | |||
| 9793a13646 | |||
| d6dd72bfb3 | |||
| ae79bae1d6 | |||
| 974b5fb30e | |||
| 5d7ef22cfd |
@@ -83,7 +83,7 @@ jobs:
|
|||||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64_en-US.msi
|
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64_en-US.msi
|
||||||
asset_content_type: application/x-msi
|
asset_content_type: application/x-msi
|
||||||
|
|
||||||
- name: upload release asset (Linux/Debian)
|
- name: upload release asset (Linux/.deb)
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-20.04'
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@@ -94,7 +94,7 @@ jobs:
|
|||||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.deb
|
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.deb
|
||||||
asset_content_type: application/x-debian-package
|
asset_content_type: application/x-debian-package
|
||||||
|
|
||||||
- name: upload release asset (Linux/AppImage)
|
- name: upload release asset (Linux/.AppImage)
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-20.04'
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
@@ -105,13 +105,25 @@ jobs:
|
|||||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.AppImage
|
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_amd64.AppImage
|
||||||
asset_content_type: application/x-executable
|
asset_content_type: application/x-executable
|
||||||
|
|
||||||
- name: upload release asset (MacOS)
|
- name: upload release asset (MacOS/.dmg)
|
||||||
if: matrix.platform == 'macos-latest'
|
if: matrix.platform == 'macos-latest'
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||||
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/dmg/card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64.dmg
|
asset_path: card-collection-manager-2/src-tauri/target/release/bundle/dmg/card-collection-manager-2_${{ needs.create-release.outputs.version }}_aarch64.dmg
|
||||||
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_x64.dmg
|
asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}_aarch64.dmg
|
||||||
asset_content_type: application/x-apple-diskimage
|
asset_content_type: application/x-apple-diskimage
|
||||||
|
|
||||||
|
#- name: upload release asset (MacOS/.app)
|
||||||
|
# if: matrix.platform == 'macos-latest'
|
||||||
|
# uses: actions/upload-release-asset@v1
|
||||||
|
# env:
|
||||||
|
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
# with:
|
||||||
|
# upload_url: ${{ needs.create-release.outputs.release_upload_url }}
|
||||||
|
# asset_path: card-collection-manager-2/src-tauri/target/release/bundle/macos/card-collection-manager-2.app
|
||||||
|
# asset_name: card-collection-manager-2_${{ needs.create-release.outputs.version }}.app
|
||||||
|
# asset_content_type: application/x-mach-binary
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,11 @@
|
|||||||
# Card Collection Manager 2
|
# Card Collection Manager 2
|
||||||
|
|
||||||
|
[](https://github.com/sebastiandine/Card-Collection-Manager-3)
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> This project (**CCM2**) is deprecated and no longer actively developed.
|
||||||
|
> Development continues in **CCM3**: https://github.com/sebastiandine/Card-Collection-Manager-3
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
@@ -19,10 +26,20 @@ After performing these steps, the next time you open CCM2, you will see your col
|
|||||||
|
|
||||||
|
|
||||||
## How to build/ contribute
|
## How to build/ contribute
|
||||||
|
|
||||||
|
### Creating a new version
|
||||||
|
To create a new version that is properly picked up by the pipeline to create a new release, adjust the version in the following files:
|
||||||
|
```
|
||||||
|
version
|
||||||
|
card-collection-manager-2/package.json
|
||||||
|
card-collection-manager-2/src-tauri/tauri.conf.json
|
||||||
|
card-collection-manager-2/src-tauri/Cargo.toml
|
||||||
|
```
|
||||||
|
|
||||||
### Contribute
|
### Contribute
|
||||||
The project includes configuration for [VSCode development containers](https://code.visualstudio.com/docs/remote/containers) which should be the preffered environment to develop new features of the app. The container automatically sets up a whole Tauri development environment including Typescript & Rust plugins for VSCode.
|
The project includes configuration for [VSCode development containers](https://code.visualstudio.com/docs/remote/containers) which should be the preffered environment to develop new features of the app. The container automatically sets up a whole Tauri development environment including Typescript & Rust plugins for VSCode.
|
||||||
|
|
||||||
Also, in directory `hooks/` you find some helpful git hooks that automate/standardize some work. You can activate these hooks by executing the script `activate_hooks.sh` from within the `hooks/` directory. If you are receiving errors like `fatal: cannot run .git/hooks/pre-commit: No such file or directory`, check the line-end sequence of the hook scripts, adjust them according to your system and run `activate_hooks.sh` again.
|
Also, in directory `hooks/` you find some helpful git hooks that automate/standardize some work. You can activate these hooks by executing the script `activate_hooks.sh` from within the `hooks/` directory. If you are receiving errors like `fatal: cannot run .git/hooks/pre-commit: No such file or directory`, check the line-end sequence of the hook scripts, adjust them according to your system and run `activate_hooks.sh` again. The hooks are especially useful for versioning. They ensure that the version number in each of the 3 manifest files are the same and create a `version` file with the current version at the project's root level, which can be picked up easily by automated CI/CD tasks.
|
||||||
|
|
||||||
Additionally, if you want to run the GUI out of the container, you need to use a X11 tool. I will briefly explain how to run them in order to display the GUI from the container:
|
Additionally, if you want to run the GUI out of the container, you need to use a X11 tool. I will briefly explain how to run them in order to display the GUI from the container:
|
||||||
|
|
||||||
|
|||||||
Regular → Executable
+28
-28
@@ -1,28 +1,28 @@
|
|||||||
{
|
{
|
||||||
"name": "card-collection-manager-2",
|
"name": "card-collection-manager-2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.1",
|
"version": "1.0.4",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev -p 1420",
|
"dev": "next dev -p 1420",
|
||||||
"build": "next build && next export -o dist",
|
"build": "next build && next export -o dist",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^1.1.0",
|
"@tauri-apps/api": "^1.1.0",
|
||||||
"next": "^12.2.5",
|
"next": "^12.2.5",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-icons": "^4.6.0",
|
"react-icons": "^4.6.0",
|
||||||
"react-loader-spinner": "^5.3.4"
|
"react-loader-spinner": "^5.3.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.1.0",
|
"@tauri-apps/cli": "^1.1.0",
|
||||||
"@types/node": "^18.7.11",
|
"@types/node": "^18.7.11",
|
||||||
"@types/react": "^18.0.17",
|
"@types/react": "^18.0.17",
|
||||||
"@types/react-dom": "^18.0.6",
|
"@types/react-dom": "^18.0.6",
|
||||||
"autoprefixer": "^10.4.13",
|
"autoprefixer": "^10.4.13",
|
||||||
"postcss": "^8.4.18",
|
"postcss": "^8.4.18",
|
||||||
"tailwindcss": "^3.2.2",
|
"tailwindcss": "^3.2.2",
|
||||||
"typescript": "^4.7.4"
|
"typescript": "^4.7.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -203,7 +203,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "card-collection-manager-2"
|
name = "card-collection-manager-2"
|
||||||
version = "1.0.0"
|
version = "1.0.3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64",
|
"base64",
|
||||||
"image",
|
"image",
|
||||||
|
|||||||
Regular → Executable
+42
-42
@@ -1,42 +1,42 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "card-collection-manager-2"
|
name = "card-collection-manager-2"
|
||||||
version = "1.0.1"
|
version = "1.0.4"
|
||||||
description = "A Tauri App"
|
description = "A Tauri App"
|
||||||
authors = ["you"]
|
authors = ["Sebastian Dine"]
|
||||||
license = ""
|
license = ""
|
||||||
repository = ""
|
repository = ""
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
rust-version = "1.57"
|
rust-version = "1.57"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.1", features = [] }
|
tauri-build = { version = "1.1", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.1", features = ["api-all"] }
|
tauri = { version = "1.1", features = ["api-all"] }
|
||||||
|
|
||||||
# b64 image encoding
|
# b64 image encoding
|
||||||
base64 = "0.13"
|
base64 = "0.13"
|
||||||
image = "0.24"
|
image = "0.24"
|
||||||
|
|
||||||
# rest calls
|
# rest calls
|
||||||
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
reqwest = { version = "0.11", features = ["blocking", "json"] }
|
||||||
|
|
||||||
# iterator for enums
|
# iterator for enums
|
||||||
strum = "0.24"
|
strum = "0.24"
|
||||||
strum_macros = "0.24"
|
strum_macros = "0.24"
|
||||||
|
|
||||||
# data type checker, e.g. is_digit
|
# data type checker, e.g. is_digit
|
||||||
nom = "7.1.1"
|
nom = "7.1.1"
|
||||||
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
|
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
|
||||||
default = [ "custom-protocol" ]
|
default = [ "custom-protocol" ]
|
||||||
# this feature is used used for production builds where `devPath` points to the filesystem
|
# this feature is used used for production builds where `devPath` points to the filesystem
|
||||||
# DO NOT remove this
|
# DO NOT remove this
|
||||||
custom-protocol = [ "tauri/custom-protocol" ]
|
custom-protocol = [ "tauri/custom-protocol" ]
|
||||||
|
|||||||
@@ -14,7 +14,12 @@ pub fn format_text_for_fs(text: &String) -> String {
|
|||||||
.replace(":", "-")
|
.replace(":", "-")
|
||||||
.replace("&", "And")
|
.replace("&", "And")
|
||||||
.replace("|", "Or")
|
.replace("|", "Or")
|
||||||
|
.replace("á", "a")
|
||||||
.replace("é", "e")
|
.replace("é", "e")
|
||||||
|
.replace("í", "i")
|
||||||
|
.replace("ó", "o")
|
||||||
|
.replace("ú", "u")
|
||||||
|
.replace("û", "u")
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parse an index from the end of a filename. This function supports indices with
|
/// Parse an index from the end of a filename. This function supports indices with
|
||||||
|
|||||||
Regular → Executable
+67
-67
@@ -1,67 +1,67 @@
|
|||||||
{
|
{
|
||||||
"build": {
|
"build": {
|
||||||
"beforeDevCommand": "yarn dev",
|
"beforeDevCommand": "yarn dev",
|
||||||
"beforeBuildCommand": "yarn build",
|
"beforeBuildCommand": "yarn build",
|
||||||
"devPath": "http://localhost:1420",
|
"devPath": "http://localhost:1420",
|
||||||
"distDir": "../dist",
|
"distDir": "../dist",
|
||||||
"withGlobalTauri": false
|
"withGlobalTauri": false
|
||||||
},
|
},
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "card-collection-manager-2",
|
"productName": "card-collection-manager-2",
|
||||||
"version": "1.0.0"
|
"version": "1.0.4"
|
||||||
},
|
},
|
||||||
"tauri": {
|
"tauri": {
|
||||||
"allowlist": {
|
"allowlist": {
|
||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"category": "DeveloperTool",
|
"category": "DeveloperTool",
|
||||||
"copyright": "",
|
"copyright": "",
|
||||||
"deb": {
|
"deb": {
|
||||||
"depends": []
|
"depends": []
|
||||||
},
|
},
|
||||||
"externalBin": [],
|
"externalBin": [],
|
||||||
"icon": [
|
"icon": [
|
||||||
"icons/32x32.png",
|
"icons/32x32.png",
|
||||||
"icons/128x128.png",
|
"icons/128x128.png",
|
||||||
"icons/icon.icns",
|
"icons/icon.icns",
|
||||||
"icons/icon.ico"
|
"icons/icon.ico"
|
||||||
],
|
],
|
||||||
"identifier": "com.sdine.dev",
|
"identifier": "com.sdine.dev",
|
||||||
"longDescription": "",
|
"longDescription": "",
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"entitlements": null,
|
"entitlements": null,
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"providerShortName": null,
|
"providerShortName": null,
|
||||||
"signingIdentity": null
|
"signingIdentity": null
|
||||||
},
|
},
|
||||||
"resources": [],
|
"resources": [],
|
||||||
"shortDescription": "",
|
"shortDescription": "",
|
||||||
"targets": "all",
|
"targets": "all",
|
||||||
"windows": {
|
"windows": {
|
||||||
"certificateThumbprint": null,
|
"certificateThumbprint": null,
|
||||||
"digestAlgorithm": "sha256",
|
"digestAlgorithm": "sha256",
|
||||||
"timestampUrl": ""
|
"timestampUrl": ""
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
"csp": null
|
"csp": null
|
||||||
},
|
},
|
||||||
"updater": {
|
"updater": {
|
||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
"windows": [
|
"windows": [
|
||||||
{
|
{
|
||||||
"fullscreen": false,
|
"fullscreen": false,
|
||||||
"resizable": true,
|
"resizable": true,
|
||||||
"title": "Card Collection Manager 2",
|
"title": "Card Collection Manager 2",
|
||||||
"minWidth": 1300,
|
"minWidth": 1300,
|
||||||
"minHeight": 900,
|
"minHeight": 900,
|
||||||
"width": 1300,
|
"width": 1300,
|
||||||
"height": 900
|
"height": 900
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
1.0.0
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cp ./pre-commit ../.git/hooks
|
cp ./pre-commit ../.git/hooks
|
||||||
+10
-7
@@ -1,26 +1,29 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PROJECT_ROOT=$(pwd)
|
PROJECT_ROOT=$(pwd)
|
||||||
|
|
||||||
# check if version and project name are the same in frontend and backend manifest
|
# Check if version and project name are the same in all manifest files.
|
||||||
|
# TAURI_VERSION is the version that is actually used by the tauri build command,
|
||||||
|
# but to avoid any misconception, versions in all manifests should be the same.
|
||||||
cd $PROJECT_ROOT && cd card-collection-manager-2/src-tauri
|
cd $PROJECT_ROOT && cd card-collection-manager-2/src-tauri
|
||||||
CARGO_VERSION=$(cargo read-manifest | jq -r .version)
|
CARGO_VERSION=$(cargo read-manifest | jq -r .version)
|
||||||
CARGO_NAME=$(cargo read-manifest | jq -r .name)
|
CARGO_NAME=$(cargo read-manifest | jq -r .name)
|
||||||
|
TAURI_VERSION=$(cat tauri.conf.json | jq -r .package.version)
|
||||||
|
TAURI_NAME=$(cat tauri.conf.json | jq -r .package.productName)
|
||||||
cd $PROJECT_ROOT && cd card-collection-manager-2
|
cd $PROJECT_ROOT && cd card-collection-manager-2
|
||||||
YARN_VERSION=$(cat package.json | jq -r .version)
|
YARN_VERSION=$(cat package.json | jq -r .version)
|
||||||
YARN_NAME=$(cat package.json | jq -r .name)
|
YARN_NAME=$(cat package.json | jq -r .name)
|
||||||
|
|
||||||
if [ $CARGO_VERSION != $YARN_VERSION ]; then
|
if [ $CARGO_VERSION != $YARN_VERSION ] || [ $CARGO_VERSION != $TAURI_VERSION ] || [ $YARN_VERSION != $TAURI_VERSION ]; then
|
||||||
echo "[PRE-COMMIT] Project version in 'package.json' and 'Cargo.toml' does not match."
|
echo "[PRE-COMMIT] Project version in manifests does not match."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ $CARGO_NAME != $YARN_NAME ]; then
|
if [ $CARGO_NAME != $YARN_NAME ] || [ $CARGO_NAME != $TAURI_NAME ] || [ $YARN_NAME != $TAURI_NAME ]; then
|
||||||
echo "[PRE-COMMIT] Project name in 'package.json' and 'Cargo.toml' does not match."
|
echo "[PRE-COMMIT] Project name in manifests does not match."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
cd $PROJECT_ROOT
|
cd $PROJECT_ROOT
|
||||||
echo $CARGO_VERSION > version
|
echo $TAURI_VERSION > version
|
||||||
git add version
|
git add version
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
Reference in New Issue
Block a user