diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index f48f326..4e1d52f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -2,9 +2,10 @@ name: Build Compotes app. on: push: - branches: [ rewrite ] + branches: [ main ] + tags: [ 'v[0-9]+.*' ] pull_request: - branches: [ rewrite ] + branches: [ main ] jobs: build: @@ -17,8 +18,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - - { name: "Checkout the code", uses: actions/checkout@v2 } - + - uses: actions/checkout@v4 - name: 🗄️ Setup Rust cache uses: actions/cache@v2 with: @@ -32,11 +32,11 @@ jobs: - name: 🍃 Install Node.js uses: actions/setup-node@v2 with: - node-version: 16 - cache: yarn - cache-dependency-path: | - yarn.lock - tests/webdriverio/yarn.lock + node-version: 18 + + - name: 🍃 Install Yarn + run: | + npm i -g npm yarn - name: 🦀 Install Rust uses: actions-rs/toolchain@v1 @@ -77,10 +77,94 @@ jobs: run: | yarn test - - name: 🚀 Upload release artifacts - uses: actions/upload-artifact@v2 + - name: 🗃 Store artifacts (release only) + uses: actions/upload-artifact@v4 + if: matrix.os == 'ubuntu-latest' && startsWith(github.ref, 'refs/tags/v') with: - name: release-${{ matrix.os }} - path: | - src-tauri/target/release/compotes* - src-tauri/target/release/bundle/* + name: compotes_artifacts_${{ matrix.os }} + overwrite: true + path: | + src-tauri/target/release/compotes + src-tauri/target/release/bundle/deb/*.deb + + - name: 🗃 Store Windows artifacts (release only) + uses: actions/upload-artifact@v4 + if: matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/v') + with: + name: compotes_artifacts_${{ matrix.os }} + overwrite: true + path: | + src-tauri/target/release/compotes.exe + src-tauri/target/release/bundle/msi/*.msi + + release: + runs-on: ubuntu-latest + needs: + - build + if: startsWith(github.ref, 'refs/tags/v') + steps: + - uses: actions/checkout@v4 + + - name: 🗃 Download built artifacts + uses: actions/download-artifact@v4 + + - name: Create release + uses: actions/create-release@v1 + id: create_release + with: + draft: false + prerelease: false + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + #body_path: CHANGELOG.md + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Upload all artifacts + uses: softprops/action-gh-release@v2 + with: + files: | + src-tauri/target/release/compotes.exe + src-tauri/target/release/bundle/msi/*.msi + + + + - name: Upload Windows executable + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src-tauri/target/release/compotes.exe + asset_name: compotes_${{ github.ref_name }}.exe + tag: ${{ github.ref_name }} + overwrite: true + file_glob: true + + - name: Upload Windows installer + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src-tauri/target/release/bundle/msi/compotes_*.msi + asset_name: compotes_${{ github.ref_name }}_installer.msi + tag: ${{ github.ref_name }} + overwrite: true + file_glob: true + + - name: Upload Linux executable + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src-tauri/target/release/compotes + asset_name: compotes_${{ github.ref_name }} + tag: ${{ github.ref_name }} + overwrite: true + file_glob: true + + - name: Upload Linux deb package + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src-tauri/target/release/bundle/deb/compotes_*.deb + asset_name: compotes_${{ github.ref_name }}.deb + tag: ${{ github.ref_name }} + overwrite: true + file_glob: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 4df6cfd..d38a5c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,3 @@ -# v0.20.0 +# v1.0 Complete rewrite of the old hosted PHP/Symfony app into a Desktop app built with Svelte, Typescript, Rust and Tauri. diff --git a/package.json b/package.json index 5685f64..169858e 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@orbitale/compotes-app", "version": "1.0.0", "private": true, - "license": "LGPL-3.0-or-later", + "license": "AGPL-3", "scripts": { "app": "concurrently --names \"front,back\" --raw \"vite dev\" \"tauri dev\"", "dev": "vite dev", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a4b5baa..477bedd 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -86,26 +86,6 @@ version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" -[[package]] -name = "app" -version = "0.1.0" -dependencies = [ - "anyhow", - "chrono", - "dirs", - "regex", - "rusqlite", - "rusqlite_migration", - "serde", - "serde_json", - "serde_rusqlite", - "sha2", - "slugify", - "tauri", - "tauri-build", - "tauri-codegen", -] - [[package]] name = "arboard" version = "3.4.0" @@ -618,6 +598,26 @@ dependencies = [ "memchr", ] +[[package]] +name = "compotes" +version = "1.0.0" +dependencies = [ + "anyhow", + "chrono", + "dirs", + "regex", + "rusqlite", + "rusqlite_migration", + "serde", + "serde_json", + "serde_rusqlite", + "sha2", + "slugify", + "tauri", + "tauri-build", + "tauri-codegen", +] + [[package]] name = "concurrent-queue" version = "2.5.0" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c96c894..60f4eba 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "app" -version = "0.1.0" -description = "A Tauri App" -authors = [ "you" ] -license = "" -repository = "" -default-run = "app" +name = "compotes" +version = "1.0.0" +description = "A desktop app to visualize bank account operations" +authors = [ "Alex \"Pierstoval\" Rock " ] +license = "AGPL-3" +repository = "https://github.com/Orbitale/Compotes" +default-run = "compotes" edition = "2018" [build-dependencies] @@ -28,3 +28,8 @@ tauri-codegen = { version = "1.4", features = [ ] } [features] custom-protocol = [ "tauri/custom-protocol" ] + +[profile.release] +codegen-units = 1 +lto = true +strip = "symbols" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 3330a76..63cb199 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "package": { "productName": "compotes", - "version": "0.1.0" + "version": "1.0.0" }, "build": { "distDir": "./target/frontend-build", diff --git a/src/lib/admin/LICENSE b/src/lib/admin/LICENSE deleted file mode 100644 index 0a04128..0000000 --- a/src/lib/admin/LICENSE +++ /dev/null @@ -1,165 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/src/lib/admin/README.md b/src/lib/admin/README.md deleted file mode 100644 index d68ddf6..0000000 --- a/src/lib/admin/README.md +++ /dev/null @@ -1,61 +0,0 @@ -# Svelte admin, prototype - -⚠ This package is totally a **prototype**. It's used in one single personal project and not meant for production (yet)! - -## Install - -Install `@orbitale/svelte-admin` via `yarn` or `npm`: - -```bash -yarn add -D "@orbitale/svelte-admin@git://github.com/Orbitale/SvelteAdmin.git" -npm install -D "@orbitale/svelte-admin@git://github.com/Orbitale/SvelteAdmin.git" -``` - -## Usage - -In a Svelte route file or component, use the `PaginatedTable` component to initialize an admin list: - -```sveltehtml - - -

Pages

- - -``` diff --git a/src/lib/admin/docs/example1.png b/src/lib/admin/docs/example1.png deleted file mode 100644 index 876234d..0000000 Binary files a/src/lib/admin/docs/example1.png and /dev/null differ diff --git a/src/lib/admin/package.json b/src/lib/admin/package.json deleted file mode 100644 index 85deb09..0000000 --- a/src/lib/admin/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "@orbitale/svelte-admin", - "version": "0.1.0", - "description": "(prototype) Crud base for Svelte projects", - "main": "index.js", - "repository": "https://github.com/Orbitale/SvelteAdmin", - "author": "Alex \"Pierstoval\" Rock ", - "license": "LGPL-3.0-or-later", - "dependencies": { - "bootstrap": "^5.2.3", - "date-fns": "^2.29.3", - "date-picker-svelte": "^2.3.0", - "luxon": "^3.3.0", - "sass": "^1.60.0", - "svelte": "^3.58.0" - } -} diff --git a/src/lib/admin/yarn.lock b/src/lib/admin/yarn.lock deleted file mode 100644 index 9c2c153..0000000 --- a/src/lib/admin/yarn.lock +++ /dev/null @@ -1,8 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -svelte@^3.58.0: - version "3.58.0" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.58.0.tgz#d3e6f103efd6129e51c7d709225ad3b4c052b64e" - integrity sha512-brIBNNB76mXFmU/Kerm4wFnkskBbluBDCjx/8TcpYRb298Yh2dztS2kQ6bhtjMcvUhd5ynClfwpz5h2gnzdQ1A==